@awesome-flow/ecs 0.2.0 → 0.3.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/index.cjs CHANGED
@@ -38,28 +38,23 @@ __export(src_exports, {
38
38
  FlowEcsState: () => flow_ecs_state_default,
39
39
  SystemsModuleNode: () => node_systems_module_default,
40
40
  SystemsModuleNodeTemplate: () => SystemsModuleNodeTemplate,
41
+ ecsNodeTemplates: () => ecsNodeTemplates,
41
42
  ecsNodeTypes: () => ecsNodeTypes
42
43
  });
43
44
  module.exports = __toCommonJS(src_exports);
44
45
 
45
- // src/ecs/ecs-flow-context.ts
46
+ // src/abstract/ecs-flow-context.ts
46
47
  var import_react = require("react");
47
- var EcsFlowContext = (0, import_react.createContext)({
48
- ecsFlowRepository: null,
49
- entityRepository: null,
50
- entityEventsManager: null,
51
- entityUpdateCounter: null,
52
- systemsModuleRepository: null
53
- });
48
+ var EcsFlowContext = (0, import_react.createContext)(null);
54
49
 
55
50
  // src/utils/id-generator.ts
56
- var IdGenerator = class {
51
+ var EcsIdGenerator = class {
57
52
  static entityProxy(proxy) {
58
53
  return `${proxy.entityType}:${proxy.entityUid}`;
59
54
  }
60
55
  };
61
56
 
62
- // src/ecs/ecs-flow-repository.ts
57
+ // src/abstract/ecs-flow-repository.ts
63
58
  var EcsFlowRepository = class {
64
59
  nodes;
65
60
  constructor() {
@@ -75,20 +70,20 @@ var EcsFlowRepository = class {
75
70
  return this.nodes.get(entityType.toString());
76
71
  }
77
72
  addEntityNode(node) {
78
- this.nodes.set(IdGenerator.entityProxy(node.data.entity), node);
73
+ this.nodes.set(EcsIdGenerator.entityProxy(node.data.entity), node);
79
74
  }
80
75
  getEntityNode(entity) {
81
- return this.nodes.get(IdGenerator.entityProxy(entity));
76
+ return this.nodes.get(EcsIdGenerator.entityProxy(entity));
82
77
  }
83
78
  listAllNodes() {
84
79
  return Array.from(this.nodes.values());
85
80
  }
86
81
  };
87
82
 
88
- // src/ecs/flow-ecs-state.tsx
89
- var import_react19 = require("react");
83
+ // src/flow/flow-ecs-state.tsx
84
+ var import_react21 = require("react");
90
85
 
91
- // src/ecs/flow-ecs-auto-layout.tsx
86
+ // src/flow/flow-ecs-auto-layout.tsx
92
87
  var import_abstract = require("@awesome-flow/core/abstract");
93
88
  var import_dagre = __toESM(require("@dagrejs/dagre"), 1);
94
89
  var import_react2 = require("@xyflow/react");
@@ -146,19 +141,23 @@ function FlowEcsAutoLayout(props) {
146
141
  }
147
142
  var flow_ecs_auto_layout_default = FlowEcsAutoLayout;
148
143
 
149
- // src/ecs/flow-ecs-entities.tsx
144
+ // src/flow/flow-ecs-entities.tsx
150
145
  var import_abstract4 = require("@awesome-flow/core/abstract");
151
- var import_react17 = require("react");
146
+ var import_react19 = require("react");
152
147
 
153
148
  // src/nodes/node-systems-module.tsx
154
149
  var import_layout = require("@awesome-flow/core/layout");
155
150
  var import_react7 = require("react");
151
+ var import_core4 = require("@mantine/core");
156
152
 
157
153
  // src/layout/systems-module-layout.tsx
158
154
  var import_systems = require("@awesome-ecs/abstract/systems");
159
155
  var import_core3 = require("@mantine/core");
160
156
  var import_react6 = require("react");
161
157
 
158
+ // src/components/pipeline-middleware-list.tsx
159
+ var import_core2 = require("@mantine/core");
160
+
162
161
  // src/components/badge-list.tsx
163
162
  var import_core = require("@mantine/core");
164
163
  var import_react5 = require("react");
@@ -184,7 +183,6 @@ function BadgeList(props) {
184
183
  var badge_list_default = (0, import_react5.memo)(BadgeList);
185
184
 
186
185
  // src/components/pipeline-middleware-list.tsx
187
- var import_core2 = require("@mantine/core");
188
186
  var import_jsx_runtime3 = require("react/jsx-runtime");
189
187
  function PipelineMiddlewareList(props) {
190
188
  let middleware = [];
@@ -206,7 +204,7 @@ var import_jsx_runtime4 = require("react/jsx-runtime");
206
204
  function SystemsModuleLayout(props) {
207
205
  const { module: module2 } = props;
208
206
  const runtimeContext = module2["runtimeContext"];
209
- const systemContext = runtimeContext.systemContext;
207
+ const { systemContext } = runtimeContext;
210
208
  const { status } = (0, import_react6.useMemo)(() => {
211
209
  return systemContext.runtime;
212
210
  }, [systemContext.runtime.status]);
@@ -230,7 +228,6 @@ function SystemsModuleLayout(props) {
230
228
  var systems_module_layout_default = SystemsModuleLayout;
231
229
 
232
230
  // src/nodes/node-systems-module.tsx
233
- var import_core4 = require("@mantine/core");
234
231
  var import_jsx_runtime5 = require("react/jsx-runtime");
235
232
  function SystemsModuleNode({ id, data, selected, type }) {
236
233
  const { systemsModuleRepository } = (0, import_react7.useContext)(EcsFlowContext);
@@ -240,9 +237,8 @@ function SystemsModuleNode({ id, data, selected, type }) {
240
237
  {
241
238
  id,
242
239
  selected,
243
- handles: data.handles,
240
+ data,
244
241
  title: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_core4.Badge, { fullWidth: true, color: "indigo", variant: "transparent", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(formatter_camel_case_default, { value: data.entityType }) }),
245
- templateId: data.templateId,
246
242
  type,
247
243
  children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(systems_module_layout_default, { type: data.entityType, module: module2 })
248
244
  }
@@ -311,7 +307,7 @@ var import_react11 = require("react");
311
307
  var import_jsx_runtime9 = require("react/jsx-runtime");
312
308
  function EntityProxyList(props) {
313
309
  const proxies = Array.from(props.entity.proxies.values()).map((c) => c.values());
314
- const items = proxies.map((p) => Array.from(p).map((k) => IdGenerator.entityProxy(k))).flat();
310
+ const items = proxies.map((p) => Array.from(p).map((k) => EcsIdGenerator.entityProxy(k))).flat();
315
311
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core8.Accordion.Item, { value: "proxies", children: [
316
312
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Accordion.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Badge, { fullWidth: true, variant: "light", rightSection: items.length, children: "Proxies" }) }),
317
313
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Accordion.Panel, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Stack, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(badge_list_default, { items, badge: { variant: "outline" } }) }) })
@@ -386,9 +382,8 @@ function EntityNode({ id, data, selected, type }) {
386
382
  {
387
383
  id,
388
384
  selected,
389
- handles: data.handles,
385
+ data,
390
386
  title: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Badge, { fullWidth: true, variant: "transparent", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(formatter_camel_case_default, { value: entity.myProxy.entityType }) }),
391
- templateId: data.templateId,
392
387
  type,
393
388
  children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(entity_layout_default, { entity })
394
389
  }
@@ -396,7 +391,88 @@ function EntityNode({ id, data, selected, type }) {
396
391
  }
397
392
  var node_entity_default = EntityNode;
398
393
 
399
- // src/node-types.ts
394
+ // src/templates/template-entity-node.ts
395
+ var import_utils = require("@awesome-flow/core/utils");
396
+ var import_react15 = require("@xyflow/react");
397
+
398
+ // src/abstract/handle-types.ts
399
+ var EcsHandleDataType = /* @__PURE__ */ ((EcsHandleDataType2) => {
400
+ EcsHandleDataType2[EcsHandleDataType2["proxy"] = 1] = "proxy";
401
+ EcsHandleDataType2[EcsHandleDataType2["module"] = 2] = "module";
402
+ return EcsHandleDataType2;
403
+ })(EcsHandleDataType || {});
404
+
405
+ // src/templates/template-entity-node.ts
406
+ var EntityNodeTemplate = class {
407
+ create() {
408
+ const data = {
409
+ title: "Entity",
410
+ entity: null
411
+ };
412
+ return {
413
+ id: import_utils.IDGenerator.template(),
414
+ removable: false,
415
+ type: "entity-node" /* entity */,
416
+ data,
417
+ handles: [
418
+ {
419
+ dataType: 1 /* proxy */,
420
+ position: import_react15.Position.Left,
421
+ connection: "target",
422
+ disabled: true
423
+ },
424
+ {
425
+ dataType: 1 /* proxy */,
426
+ position: import_react15.Position.Right,
427
+ connection: "source",
428
+ disabled: true
429
+ }
430
+ ]
431
+ };
432
+ }
433
+ isHandleAllowed() {
434
+ return false;
435
+ }
436
+ getHandleAllowedDataType() {
437
+ return 1 /* proxy */;
438
+ }
439
+ };
440
+
441
+ // src/templates/template-systems-module.ts
442
+ var import_utils2 = require("@awesome-flow/core/utils");
443
+ var import_react16 = require("@xyflow/react");
444
+ var SystemsModuleNodeTemplate = class {
445
+ create() {
446
+ const data = {
447
+ title: "Systems Module",
448
+ entityType: null,
449
+ handles: null,
450
+ templateId: null
451
+ };
452
+ return {
453
+ id: import_utils2.IDGenerator.template(),
454
+ removable: false,
455
+ type: "systems-module-node" /* systemsModule */,
456
+ data,
457
+ handles: [
458
+ {
459
+ dataType: 2 /* module */,
460
+ position: import_react16.Position.Left,
461
+ connection: "target",
462
+ disabled: true
463
+ }
464
+ ]
465
+ };
466
+ }
467
+ isHandleAllowed() {
468
+ return false;
469
+ }
470
+ getHandleAllowedDataType() {
471
+ return 2 /* module */;
472
+ }
473
+ };
474
+
475
+ // src/abstract/node-types.ts
400
476
  var EcsNodeType = /* @__PURE__ */ ((EcsNodeType2) => {
401
477
  EcsNodeType2["systemsModule"] = "systems-module-node";
402
478
  EcsNodeType2["entity"] = "entity-node";
@@ -406,17 +482,21 @@ var ecsNodeTypes = {
406
482
  ["systems-module-node" /* systemsModule */]: node_systems_module_default,
407
483
  ["entity-node" /* entity */]: node_entity_default
408
484
  };
485
+ var ecsNodeTemplates = {
486
+ ["entity-node" /* entity */]: new EntityNodeTemplate(),
487
+ ["systems-module-node" /* systemsModule */]: new SystemsModuleNodeTemplate()
488
+ };
409
489
 
410
- // src/ecs/flow-ecs-edge-proxies.tsx
411
- var import_react15 = require("react");
490
+ // src/flow/flow-ecs-edge-proxies.tsx
491
+ var import_react17 = require("react");
412
492
  var import_abstract2 = require("@awesome-flow/core/abstract");
413
493
  var import_jsx_runtime14 = require("react/jsx-runtime");
414
494
  function FlowEcsEdgeProxies(props) {
415
495
  const { nodesToConnect } = props;
416
- const context = (0, import_react15.useContext)(import_abstract2.FlowContext);
496
+ const context = (0, import_react17.useContext)(import_abstract2.FlowContext);
417
497
  const onConnect = context.useFlowStore((state) => state.onConnect);
418
- const { ecsFlowRepository, entityRepository } = (0, import_react15.useContext)(EcsFlowContext);
419
- (0, import_react15.useEffect)(() => {
498
+ const { ecsFlowRepository, entityRepository } = (0, import_react17.useContext)(EcsFlowContext);
499
+ (0, import_react17.useEffect)(() => {
420
500
  for (const node of nodesToConnect) {
421
501
  const sourceHandle = node.data.handles.find((h) => h.connection === "source");
422
502
  const entity = entityRepository.get(node.data.entity);
@@ -440,16 +520,16 @@ function FlowEcsEdgeProxies(props) {
440
520
  }
441
521
  var flow_ecs_edge_proxies_default = FlowEcsEdgeProxies;
442
522
 
443
- // src/ecs/flow-ecs-edge-modules.tsx
444
- var import_react16 = require("react");
523
+ // src/flow/flow-ecs-edge-modules.tsx
524
+ var import_react18 = require("react");
445
525
  var import_abstract3 = require("@awesome-flow/core/abstract");
446
526
  var import_jsx_runtime15 = require("react/jsx-runtime");
447
527
  function FlowEcsEdgeModules(props) {
448
528
  const { nodesToConnect } = props;
449
- const context = (0, import_react16.useContext)(import_abstract3.FlowContext);
529
+ const context = (0, import_react18.useContext)(import_abstract3.FlowContext);
450
530
  const onConnect = context.useFlowStore((state) => state.onConnect);
451
- const { ecsFlowRepository, entityRepository } = (0, import_react16.useContext)(EcsFlowContext);
452
- (0, import_react16.useEffect)(() => {
531
+ const { ecsFlowRepository, entityRepository } = (0, import_react18.useContext)(EcsFlowContext);
532
+ (0, import_react18.useEffect)(() => {
453
533
  for (const node of nodesToConnect) {
454
534
  const sourceHandle = node.data.handles.find((h) => h.connection === "source");
455
535
  const entity = entityRepository.get(node.data.entity);
@@ -469,14 +549,14 @@ function FlowEcsEdgeModules(props) {
469
549
  }
470
550
  var flow_ecs_edge_modules_default = FlowEcsEdgeModules;
471
551
 
472
- // src/ecs/flow-ecs-entities.tsx
552
+ // src/flow/flow-ecs-entities.tsx
473
553
  var import_jsx_runtime16 = require("react/jsx-runtime");
474
554
  function FlowEcsEntities() {
475
- const context = (0, import_react17.useContext)(import_abstract4.FlowContext);
555
+ const context = (0, import_react19.useContext)(import_abstract4.FlowContext);
476
556
  const addNodes = context.useFlowStore((state) => state.addNodes);
477
- const { ecsFlowRepository, entityRepository } = (0, import_react17.useContext)(EcsFlowContext);
478
- const [entityNodes, setEntityNodes] = (0, import_react17.useState)([]);
479
- (0, import_react17.useEffect)(() => {
557
+ const { ecsFlowRepository, entityRepository } = (0, import_react19.useContext)(EcsFlowContext);
558
+ const [entityNodes, setEntityNodes] = (0, import_react19.useState)([]);
559
+ (0, import_react19.useEffect)(() => {
480
560
  const entities = entityRepository.listAll();
481
561
  const nodes = [];
482
562
  for (const entity of entities) {
@@ -499,15 +579,15 @@ function FlowEcsEntities() {
499
579
  }
500
580
  var flow_ecs_entities_default = FlowEcsEntities;
501
581
 
502
- // src/ecs/flow-ecs-modules.tsx
503
- var import_react18 = require("react");
582
+ // src/flow/flow-ecs-modules.tsx
583
+ var import_react20 = require("react");
504
584
  var import_abstract5 = require("@awesome-flow/core/abstract");
505
585
  var import_jsx_runtime17 = require("react/jsx-runtime");
506
586
  function FlowEcsModules() {
507
- const context = (0, import_react18.useContext)(import_abstract5.FlowContext);
587
+ const context = (0, import_react20.useContext)(import_abstract5.FlowContext);
508
588
  const addNodes = context.useFlowStore((state) => state.addNodes);
509
- const { ecsFlowRepository, systemsModuleRepository } = (0, import_react18.useContext)(EcsFlowContext);
510
- (0, import_react18.useEffect)(() => {
589
+ const { ecsFlowRepository, systemsModuleRepository } = (0, import_react20.useContext)(EcsFlowContext);
590
+ (0, import_react20.useEffect)(() => {
511
591
  const modules = Array.from(systemsModuleRepository.list()).filter((m) => !!m);
512
592
  const keys = Array.from(modules.values()).map((v) => v[0]);
513
593
  const nodesToAdd = [];
@@ -531,16 +611,16 @@ function FlowEcsModules() {
531
611
  }
532
612
  var flow_ecs_modules_default = FlowEcsModules;
533
613
 
534
- // src/ecs/flow-ecs-state.tsx
614
+ // src/flow/flow-ecs-state.tsx
535
615
  var import_jsx_runtime18 = require("react/jsx-runtime");
536
616
  function FlowEcsState(props) {
537
- const [, setUpdates] = (0, import_react19.useState)(0);
538
- const [needsLayout, setNeedsLayout] = (0, import_react19.useState)(false);
539
- const { ecsFlowRepository } = (0, import_react19.useContext)(EcsFlowContext);
540
- (0, import_react19.useEffect)(() => {
617
+ const [, setUpdates] = (0, import_react21.useState)(0);
618
+ const [needsLayout, setNeedsLayout] = (0, import_react21.useState)(false);
619
+ const { ecsFlowRepository } = (0, import_react21.useContext)(EcsFlowContext);
620
+ (0, import_react21.useEffect)(() => {
541
621
  setNeedsLayout(true);
542
622
  }, [ecsFlowRepository.sizeNodes]);
543
- (0, import_react19.useEffect)(() => {
623
+ (0, import_react21.useEffect)(() => {
544
624
  setInterval(() => {
545
625
  setUpdates((updates) => updates + 1);
546
626
  }, 1e3);
@@ -552,87 +632,6 @@ function FlowEcsState(props) {
552
632
  ] });
553
633
  }
554
634
  var flow_ecs_state_default = FlowEcsState;
555
-
556
- // src/templates/template-entity-node.ts
557
- var import_utils = require("@awesome-flow/core/utils");
558
-
559
- // src/handle-types.ts
560
- var EcsHandleDataType = /* @__PURE__ */ ((EcsHandleDataType2) => {
561
- EcsHandleDataType2[EcsHandleDataType2["proxy"] = 1] = "proxy";
562
- EcsHandleDataType2[EcsHandleDataType2["module"] = 2] = "module";
563
- return EcsHandleDataType2;
564
- })(EcsHandleDataType || {});
565
-
566
- // src/templates/template-entity-node.ts
567
- var import_react20 = require("@xyflow/react");
568
- var EntityNodeTemplate = class {
569
- create() {
570
- const data = {
571
- title: "Entity",
572
- entity: null
573
- };
574
- return {
575
- id: import_utils.IDGenerator.template(),
576
- removable: false,
577
- type: "entity-node" /* entity */,
578
- data,
579
- handles: [
580
- {
581
- dataType: 1 /* proxy */,
582
- position: import_react20.Position.Left,
583
- connection: "target",
584
- disabled: true
585
- },
586
- {
587
- dataType: 1 /* proxy */,
588
- position: import_react20.Position.Right,
589
- connection: "source",
590
- disabled: true
591
- }
592
- ]
593
- };
594
- }
595
- isHandleAllowed() {
596
- return false;
597
- }
598
- getHandleAllowedDataType() {
599
- return 1 /* proxy */;
600
- }
601
- };
602
-
603
- // src/templates/template-systems-module.ts
604
- var import_utils2 = require("@awesome-flow/core/utils");
605
- var import_react21 = require("@xyflow/react");
606
- var SystemsModuleNodeTemplate = class {
607
- create() {
608
- const data = {
609
- title: "Systems Module",
610
- entityType: null,
611
- handles: null,
612
- templateId: null
613
- };
614
- return {
615
- id: import_utils2.IDGenerator.template(),
616
- removable: false,
617
- type: "systems-module-node" /* systemsModule */,
618
- data,
619
- handles: [
620
- {
621
- dataType: 2 /* module */,
622
- position: import_react21.Position.Left,
623
- connection: "target",
624
- disabled: true
625
- }
626
- ]
627
- };
628
- }
629
- isHandleAllowed() {
630
- return false;
631
- }
632
- getHandleAllowedDataType() {
633
- return 2 /* module */;
634
- }
635
- };
636
635
  // Annotate the CommonJS export names for ESM import in node:
637
636
  0 && (module.exports = {
638
637
  EcsFlowContext,
@@ -644,6 +643,7 @@ var SystemsModuleNodeTemplate = class {
644
643
  FlowEcsState,
645
644
  SystemsModuleNode,
646
645
  SystemsModuleNodeTemplate,
646
+ ecsNodeTemplates,
647
647
  ecsNodeTypes
648
648
  });
649
649
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/ecs/ecs-flow-context.ts","../src/utils/id-generator.ts","../src/ecs/ecs-flow-repository.ts","../src/ecs/flow-ecs-state.tsx","../src/ecs/flow-ecs-auto-layout.tsx","../src/ecs/flow-ecs-entities.tsx","../src/nodes/node-systems-module.tsx","../src/layout/systems-module-layout.tsx","../src/components/badge-list.tsx","../src/components/formatter-camel-case.tsx","../src/components/pipeline-middleware-list.tsx","../src/nodes/node-entity.tsx","../src/layout/entity-layout.tsx","../src/components/entity-component-list.tsx","../src/components/entity-component-inspector.tsx","../src/components/object-inspector.tsx","../src/components/entity-proxy-list.tsx","../src/components/entity-subscription-list.tsx","../src/components/entity-update-counter.tsx","../src/node-types.ts","../src/ecs/flow-ecs-edge-proxies.tsx","../src/ecs/flow-ecs-edge-modules.tsx","../src/ecs/flow-ecs-modules.tsx","../src/templates/template-entity-node.ts","../src/handle-types.ts","../src/templates/template-systems-module.ts"],"sourcesContent":["export * from './ecs/ecs-flow-context';\nexport * from './ecs/ecs-flow-repository';\n\nexport { default as FlowEcsState } from './ecs/flow-ecs-state';\n\nexport { default as EntityNode } from './nodes/node-entity';\nexport { default as SystemsModuleNode } from './nodes/node-systems-module';\n\nexport * from './templates/template-entity-node';\nexport * from './templates/template-systems-module';\n\nexport * from './utils/entity-update-counter';\n\nexport * from './handle-types';\nexport * from './node-types';\nexport * from './node-props';\n","import { createContext } from 'react';\nimport { EcsFlowRepository } from './ecs-flow-repository';\nimport { IEntityRepository } from '@awesome-ecs/abstract/entities';\nimport { ISystemsModuleRepository } from '@awesome-ecs/abstract/systems';\nimport { EntityEventsManager } from '@awesome-ecs/core/entities';\nimport { IEntityUpdateCounter } from '../utils/entity-update-counter';\n\nexport type EcsFlowContextProps = {\n ecsFlowRepository: EcsFlowRepository;\n entityRepository: IEntityRepository;\n entityEventsManager: EntityEventsManager;\n entityUpdateCounter: IEntityUpdateCounter;\n systemsModuleRepository: ISystemsModuleRepository;\n};\n\nexport const EcsFlowContext = createContext<EcsFlowContextProps>({\n ecsFlowRepository: null,\n entityRepository: null,\n entityEventsManager: null,\n entityUpdateCounter: null,\n systemsModuleRepository: null,\n});\n","import { IEntityProxy } from '@awesome-ecs/abstract/entities';\n\nexport class IdGenerator {\n static entityProxy(proxy: IEntityProxy): string {\n return `${proxy.entityType}:${proxy.entityUid}`;\n }\n}\n","import { Node } from '@xyflow/react';\nimport { EntityNodeData, SystemsModuleNodeData } from '../node-props';\nimport { EntityTypeUid, IEntityProxy } from '@awesome-ecs/abstract/entities';\nimport { IdGenerator } from '../utils/id-generator';\n\nexport class EcsFlowRepository {\n private nodes: Map<string, Node>;\n\n constructor() {\n this.nodes = new Map();\n }\n\n get sizeNodes(): number {\n return this.nodes.size;\n }\n\n addSystemModuleNode(node: Node<SystemsModuleNodeData>) {\n this.nodes.set(node.data.entityType.toString(), node);\n }\n\n getSystemModuleNode(entityType: EntityTypeUid): Node<SystemsModuleNodeData> {\n return this.nodes.get(entityType.toString()) as Node<SystemsModuleNodeData>;\n }\n\n addEntityNode(node: Node<EntityNodeData>) {\n this.nodes.set(IdGenerator.entityProxy(node.data.entity), node);\n }\n\n getEntityNode(entity: IEntityProxy): Node<EntityNodeData> {\n return this.nodes.get(IdGenerator.entityProxy(entity)) as Node<EntityNodeData>;\n }\n\n listAllNodes(): Node[] {\n return Array.from(this.nodes.values());\n }\n}\n","import { useEffect, useContext, useState } from 'react';\nimport FlowEcsAutoLayout from './flow-ecs-auto-layout';\nimport FlowEcsEntities from './flow-ecs-entities';\nimport FlowEcsModules from './flow-ecs-modules';\nimport { EcsFlowContext } from './ecs-flow-context';\n\nexport type FlowEcsStateProps = {\n showSystemModules: boolean;\n showEntities: boolean;\n autoLayout: boolean;\n};\n\nfunction FlowEcsState(props: Readonly<FlowEcsStateProps>) {\n const [, setUpdates] = useState(0);\n const [needsLayout, setNeedsLayout] = useState(false);\n\n const { ecsFlowRepository } = useContext(EcsFlowContext);\n\n useEffect(() => {\n setNeedsLayout(true);\n }, [ecsFlowRepository.sizeNodes]);\n\n useEffect(() => {\n setInterval(() => {\n setUpdates((updates) => updates + 1);\n }, 1000);\n }, []);\n\n return (\n <>\n {props.showSystemModules && <FlowEcsModules />}\n {props.showEntities && <FlowEcsEntities />}\n {props.autoLayout && (\n <FlowEcsAutoLayout needsLayout={needsLayout} setNeedsLayout={setNeedsLayout} />\n )}\n </>\n );\n}\n\nexport default FlowEcsState;\n","import { FlowContext } from '@awesome-flow/core/abstract';\nimport Dagre, { GraphLabel } from '@dagrejs/dagre';\nimport { Edge, Node, useReactFlow } from '@xyflow/react';\nimport { useCallback, useContext, useEffect, useMemo } from 'react';\n\nexport type EcsFlowAutoLayoutProps = {\n needsLayout: boolean;\n setNeedsLayout: (value: boolean) => void;\n};\n\nfunction FlowEcsAutoLayout(props: Readonly<EcsFlowAutoLayoutProps>) {\n const { getNodes, getEdges } = useReactFlow();\n\n const context = useContext(FlowContext);\n const setNodes = context.useFlowStore((state) => state.setNodes);\n\n const graph = useMemo(() => new Dagre.graphlib.Graph().setDefaultEdgeLabel(() => ({})), []);\n\n const getLayoutElements = useCallback(\n (nodes: Node[], edges: Edge[], options: GraphLabel) => {\n graph.setGraph(options);\n\n edges.forEach((edge) => graph.setEdge(edge.source, edge.target));\n nodes.forEach((node) => {\n if (node.measured) {\n graph.setNode(node.id, {\n width: node.measured.width,\n height: node.measured.height,\n });\n }\n });\n\n Dagre.layout(graph);\n\n return {\n nodes: nodes.map((node) => {\n const graphNode = graph.node(node.id);\n if (graphNode) {\n return { ...node, position: { x: graphNode.x, y: graphNode.y } };\n }\n\n return node;\n }),\n edges,\n };\n },\n [graph]\n );\n\n useEffect(() => {\n if (props.needsLayout) {\n const storeNodes = getNodes();\n\n if (storeNodes?.length) {\n const edges = getEdges();\n const layout = getLayoutElements(storeNodes, edges, {\n rankdir: 'LR',\n });\n\n setNodes(layout.nodes);\n }\n }\n }, [props.needsLayout]);\n\n useEffect(() => {\n if (props.needsLayout) {\n props.setNeedsLayout(false);\n }\n });\n\n return <></>;\n}\n\nexport default FlowEcsAutoLayout;\n","import { EntityRepository } from '@awesome-ecs/core/entities';\nimport { FlowContext } from '@awesome-flow/core/abstract';\nimport { useContext, useMemo, useEffect, useState } from 'react';\nimport { EntityNodeData } from '../node-props';\nimport { EcsNodeType } from '../node-types';\nimport { Node } from '@xyflow/react';\nimport FlowEcsEdgeProxies from './flow-ecs-edge-proxies';\nimport FlowEcsEdgeModules from './flow-ecs-edge-modules';\nimport { EcsFlowContext } from './ecs-flow-context';\n\nfunction FlowEcsEntities() {\n const context = useContext(FlowContext);\n const addNodes = context.useFlowStore((state) => state.addNodes);\n\n const { ecsFlowRepository, entityRepository } = useContext(EcsFlowContext);\n const [entityNodes, setEntityNodes] = useState<Node<EntityNodeData>[]>([]);\n\n useEffect(() => {\n const entities = entityRepository.listAll();\n const nodes = [];\n\n for (const entity of entities) {\n if (ecsFlowRepository.getEntityNode(entity.myProxy)) {\n continue;\n }\n\n const node = context.nodeFactory.createNodeFromType<EntityNodeData>(EcsNodeType.entity);\n\n node.data.entity = entity.myProxy;\n node.position = { x: 0, y: 0 };\n\n ecsFlowRepository.addEntityNode(node);\n nodes.push(node);\n }\n\n setEntityNodes(nodes);\n addNodes(nodes);\n }, [entityRepository.size]);\n\n return (\n <>\n <FlowEcsEdgeProxies nodesToConnect={entityNodes} />\n <FlowEcsEdgeModules nodesToConnect={entityNodes} />\n </>\n );\n}\n\nexport default FlowEcsEntities;\n","/* eslint-disable max-classes-per-file */\nimport { Node, NodeProps } from '@xyflow/react';\nimport { NodeContainer } from '@awesome-flow/core/layout';\nimport { useContext, useMemo } from 'react';\nimport SystemsModuleLayout from '../layout/systems-module-layout';\nimport { SystemsModuleNodeData } from '../node-props';\nimport { Badge } from '@mantine/core';\nimport CamelCaseFormatter from '../components/formatter-camel-case';\nimport { EcsFlowContext } from '../ecs/ecs-flow-context';\n\nfunction SystemsModuleNode({ id, data, selected, type }: NodeProps<Node<SystemsModuleNodeData>>) {\n const { systemsModuleRepository } = useContext(EcsFlowContext);\n const module = systemsModuleRepository.get(data.entityType);\n\n return (\n <NodeContainer\n id={id}\n selected={selected}\n handles={data.handles}\n title={\n <Badge fullWidth color=\"indigo\" variant=\"transparent\">\n <CamelCaseFormatter value={data.entityType} />\n </Badge>\n }\n templateId={data.templateId}\n type={type}\n >\n <SystemsModuleLayout type={data.entityType} module={module} />\n </NodeContainer>\n );\n}\n\nexport default SystemsModuleNode;\n","import { EntityTypeUid, IEntity } from '@awesome-ecs/abstract/entities';\nimport { ISystemsModule, ISystemsRuntimeContext, SystemType } from '@awesome-ecs/abstract/systems';\nimport { Accordion, Text } from '@mantine/core';\nimport { useMemo } from 'react';\nimport PipelineMiddlewareList from '../components/pipeline-middleware-list';\n\nexport type NodeSystemModuleProps = {\n type: EntityTypeUid;\n module: ISystemsModule<IEntity>;\n};\n\nfunction SystemsModuleLayout(props: Readonly<NodeSystemModuleProps>) {\n const { module } = props;\n\n const runtimeContext = module['runtimeContext'] as ISystemsRuntimeContext<IEntity>;\n const systemContext = runtimeContext.systemContext;\n\n const { status } = useMemo(() => {\n return systemContext.runtime;\n }, [systemContext.runtime.status]);\n\n const init = runtimeContext.systemPipelines.get(SystemType.initialize);\n const update = runtimeContext.systemPipelines.get(SystemType.update);\n const render = runtimeContext.systemPipelines.get(SystemType.render);\n const sync = runtimeContext.systemPipelines.get(SystemType.sync);\n\n return (\n <>\n <Text>Status: {status}</Text>\n <Accordion>\n {init && <PipelineMiddlewareList pipeline={init} label=\"Initialize\" />}\n {update && <PipelineMiddlewareList pipeline={update} label=\"Update\" />}\n {render && <PipelineMiddlewareList pipeline={render} label=\"Render\" />}\n {sync && <PipelineMiddlewareList pipeline={sync} label=\"Sync\" />}\n </Accordion>\n </>\n );\n}\n\nexport default SystemsModuleLayout;\n","import { Badge, BadgeProps } from '@mantine/core';\nimport { memo } from 'react';\nimport FormatterCamelCase from './formatter-camel-case';\n\nexport type BadgeListProps = {\n items: (string | number)[];\n badge?: BadgeProps;\n};\n\nfunction BadgeList(props: Readonly<BadgeListProps>) {\n return props.items.map((value, i) => {\n return (\n <Badge key={i} {...(props.badge || [])}>\n <FormatterCamelCase value={value} />\n </Badge>\n );\n });\n}\n\nexport default memo(BadgeList);\n","import { memo, useMemo } from 'react';\n\nexport type CamelCaseFormatterProps = {\n value: string | number;\n};\n\nfunction CamelCaseFormatter(props: Readonly<CamelCaseFormatterProps>) {\n const value = useMemo(\n () => props.value?.toString().replace(/([a-z])([A-Z])/g, '$1 $2'),\n [props.value]\n );\n return value;\n}\n\nexport default memo(CamelCaseFormatter);\n","import { IMiddleware, IPipeline, IPipelineContext } from '@awesome-ecs/abstract/pipelines';\nimport BadgeList from './badge-list';\nimport { Accordion, Badge, Stack } from '@mantine/core';\n\nexport type PipelineMiddlewareListProps = {\n pipeline: IPipeline<IPipelineContext>;\n label: string;\n};\n\nfunction PipelineMiddlewareList(props: Readonly<PipelineMiddlewareListProps>) {\n let middleware: IMiddleware<IPipelineContext>[] = [];\n\n if (props.pipeline) {\n middleware = props.pipeline['middleware'] as IMiddleware<IPipelineContext>[];\n }\n\n const components = middleware.map((m) => {\n return m.name || m.constructor.name;\n });\n\n return (\n <Accordion.Item key={props.label} value={props.label}>\n <Accordion.Control>\n <Badge fullWidth variant=\"light\" rightSection={components.length}>\n {props.label}\n </Badge>\n </Accordion.Control>\n <Accordion.Panel>\n <Stack>\n <BadgeList items={components} badge={{ variant: 'outline' }} />\n </Stack>\n </Accordion.Panel>\n </Accordion.Item>\n );\n}\n\nexport default PipelineMiddlewareList;\n","import { Node, NodeProps } from '@xyflow/react';\nimport { NodeContainer } from '@awesome-flow/core/layout';\nimport { Badge } from '@mantine/core';\nimport { useContext, useMemo } from 'react';\nimport { EntityNodeData } from '../node-props';\nimport EntityLayout from '../layout/entity-layout';\nimport CamelCaseFormatter from '../components/formatter-camel-case';\nimport { EcsFlowContext } from '../ecs/ecs-flow-context';\n\nfunction EntityNode({ id, data, selected, type }: NodeProps<Node<EntityNodeData>>) {\n const { entityRepository } = useContext(EcsFlowContext);\n const entity = useMemo(() => entityRepository.get(data.entity), [data.entity]);\n\n return (\n <NodeContainer\n id={id}\n selected={selected}\n handles={data.handles}\n title={\n <Badge fullWidth variant=\"transparent\">\n <CamelCaseFormatter value={entity.myProxy.entityType} />\n </Badge>\n }\n templateId={data.templateId}\n type={type}\n >\n <EntityLayout entity={entity} />\n </NodeContainer>\n );\n}\n\nexport default EntityNode;\n","import { IEntity } from '@awesome-ecs/abstract/entities';\nimport { Accordion, Badge, Divider, Group } from '@mantine/core';\nimport EntityComponentList from '../components/entity-component-list';\nimport EntityProxyList from '../components/entity-proxy-list';\nimport EntitySubscriptionList from '../components/entity-subscription-list';\nimport EntityUpdateCounter from '../components/entity-update-counter';\n\nexport type NodeEntityProps = {\n entity: IEntity;\n};\n\nfunction EntityLayout({ entity }: Readonly<NodeEntityProps>) {\n return (\n <>\n <Group>\n <Badge variant=\"outline\" color=\"orange\">\n {entity.myProxy.entityUid}\n </Badge>\n <EntityUpdateCounter entityUid={entity.myProxy.entityUid} />\n </Group>\n <Divider my={5} />\n <Accordion>\n <EntityComponentList entity={entity} />\n <EntityProxyList entity={entity} />\n <EntitySubscriptionList entity={entity} />\n </Accordion>\n </>\n );\n}\n\nexport default EntityLayout;\n","import { IEntity } from '@awesome-ecs/abstract/entities';\nimport { Accordion, Badge, Stack } from '@mantine/core';\nimport { memo } from 'react';\nimport EntityComponentInspector from './entity-component-inspector';\n\nexport type EntityComponentListProps = {\n entity: IEntity;\n};\n\nfunction EntityComponentList(props: Readonly<EntityComponentListProps>) {\n const components = Array.from(props.entity.components.values());\n\n return (\n <Accordion.Item key=\"components\" value=\"components\">\n <Accordion.Control>\n <Badge fullWidth variant=\"light\" rightSection={components.length}>\n Components\n </Badge>\n </Accordion.Control>\n <Accordion.Panel>\n <Stack>\n {components.map((c, i) => (\n <EntityComponentInspector component={c} key={i} />\n ))}\n </Stack>\n </Accordion.Panel>\n </Accordion.Item>\n );\n}\n\nexport default memo(EntityComponentList);\n","import { Box, Button, Collapse } from '@mantine/core';\nimport { memo, useMemo } from 'react';\nimport { IComponent } from '@awesome-ecs/abstract/components';\nimport { useDisclosure } from '@mantine/hooks';\nimport ObjectInspector from './object-inspector';\n\nexport type EntityComponentInspectorProps = {\n component: IComponent;\n};\n\nfunction EntityComponentInspector(props: Readonly<EntityComponentInspectorProps>) {\n const [opened, { toggle }] = useDisclosure(false);\n\n const buttonColor = useMemo(() => (opened ? 'light' : 'indigo'), [opened]);\n\n return (\n <Box>\n <Button variant=\"outline\" size=\"xs\" onClick={toggle} color={buttonColor} fullWidth>\n {props.component.componentType}\n </Button>\n\n <Collapse in={opened}>{opened && <ObjectInspector data={props.component} />}</Collapse>\n </Box>\n );\n}\n\nexport default memo(EntityComponentInspector);\n","import { useComputedColorScheme } from '@mantine/core';\nimport { memo, useMemo } from 'react';\nimport { Inspector } from 'react-inspector';\n\nexport type ObjectInspectorProps = {\n data: any;\n};\n\nfunction ObjectInspector(props: Readonly<ObjectInspectorProps>) {\n const colorScheme = useComputedColorScheme();\n\n const theme = useMemo(\n () => (colorScheme === 'dark' ? 'chromeDark' : 'chromeLight'),\n [colorScheme]\n );\n\n return <Inspector table={false} theme={theme} data={props.data} />;\n}\n\nexport default memo(ObjectInspector);\n","import { IEntity } from '@awesome-ecs/abstract/entities';\nimport { Accordion, Badge, Stack } from '@mantine/core';\nimport BadgeList from './badge-list';\nimport { memo } from 'react';\nimport { IdGenerator } from '../utils/id-generator';\n\nexport type EntityProxyListProps = {\n entity: IEntity;\n};\n\nfunction EntityProxyList(props: Readonly<EntityProxyListProps>) {\n const proxies = Array.from(props.entity.proxies.values()).map((c) => c.values());\n const items = proxies.map((p) => Array.from(p).map((k) => IdGenerator.entityProxy(k))).flat();\n\n return (\n <Accordion.Item key=\"proxies\" value=\"proxies\">\n <Accordion.Control>\n <Badge fullWidth variant=\"light\" rightSection={items.length}>\n Proxies\n </Badge>\n </Accordion.Control>\n <Accordion.Panel>\n <Stack>\n <BadgeList items={items} badge={{ variant: 'outline' }} />\n </Stack>\n </Accordion.Panel>\n </Accordion.Item>\n );\n}\n\nexport default memo(EntityProxyList);\n","import { IEntity } from '@awesome-ecs/abstract/entities';\nimport { Accordion, Badge, Stack } from '@mantine/core';\nimport BadgeList from './badge-list';\nimport { memo, useContext } from 'react';\nimport { EcsFlowContext } from '../ecs/ecs-flow-context';\n\nexport type EntitySubscriptionListProps = {\n entity: IEntity;\n};\n\nfunction EntitySubscriptionList(props: Readonly<EntitySubscriptionListProps>) {\n const { entityEventsManager } = useContext(EcsFlowContext);\n const subscriptions = entityEventsManager.getSubscriptionsForEntity(props.entity.myProxy);\n\n return (\n <Accordion.Item key=\"subscriptions\" value=\"subscriptions\">\n <Accordion.Control>\n <Badge fullWidth variant=\"light\" rightSection={subscriptions.length}>\n Events\n </Badge>\n </Accordion.Control>\n <Accordion.Panel>\n <Stack>\n <BadgeList items={subscriptions} badge={{ variant: 'outline' }} />\n </Stack>\n </Accordion.Panel>\n </Accordion.Item>\n );\n}\n\nexport default memo(EntitySubscriptionList);\n","import { EntityUid } from '@awesome-ecs/abstract/entities';\nimport { Badge } from '@mantine/core';\nimport { memo, useContext, useEffect, useMemo, useState } from 'react';\nimport { EcsFlowContext } from '../ecs/ecs-flow-context';\n\nexport type EntityUpdateCounterProps = {\n entityUid: EntityUid;\n};\n\nfunction EntityUpdateCounter(props: Readonly<EntityUpdateCounterProps>) {\n const [, setRefresh] = useState(0);\n\n const { entityUpdateCounter } = useContext(EcsFlowContext);\n\n const updates = entityUpdateCounter.getUpdateCount(props.entityUid) || 0;\n const removes = entityUpdateCounter.getRemoveCount(props.entityUid) || 0;\n\n useEffect(() => {\n const interval = setInterval(() => {\n setRefresh((refresh) => refresh + 1);\n }, 1000);\n\n return () => {\n console.log('CLEAR INTERVAL');\n clearInterval(interval);\n };\n }, []);\n\n return (\n <>\n <Badge variant=\"light\">{updates}</Badge>\n <Badge variant=\"light\" color=\"orange\">\n {removes}\n </Badge>\n </>\n );\n}\n\nexport default memo(EntityUpdateCounter);\n","import { NodeTypes } from '@xyflow/react';\nimport SystemsModuleNode from './nodes/node-systems-module';\nimport EntityNode from './nodes/node-entity';\n\nexport enum EcsNodeType {\n systemsModule = 'systems-module-node',\n entity = 'entity-node',\n}\n\nexport const ecsNodeTypes = {\n [EcsNodeType.systemsModule]: SystemsModuleNode,\n [EcsNodeType.entity]: EntityNode,\n} satisfies NodeTypes;\n","import { Node } from '@xyflow/react';\nimport { useContext, useEffect } from 'react';\nimport { EntityNodeData } from '../node-props';\nimport { FlowContext } from '@awesome-flow/core/abstract';\nimport { EcsFlowContext } from './ecs-flow-context';\n\nexport type FlowEcsEdgeProxiesProps = {\n nodesToConnect: Node<EntityNodeData>[];\n};\n\nfunction FlowEcsEdgeProxies(props: Readonly<FlowEcsEdgeProxiesProps>) {\n const { nodesToConnect } = props;\n\n const context = useContext(FlowContext);\n const onConnect = context.useFlowStore((state: { onConnect: any }) => state.onConnect);\n\n const { ecsFlowRepository, entityRepository } = useContext(EcsFlowContext);\n\n useEffect(() => {\n for (const node of nodesToConnect) {\n const sourceHandle = node.data.handles.find((h) => h.connection === 'source');\n const entity = entityRepository.get(node.data.entity);\n\n for (const [, proxyMap] of entity.proxies) {\n for (const proxy of proxyMap.values()) {\n const proxyNode = ecsFlowRepository.getEntityNode(proxy);\n\n if (proxyNode) {\n const targetHandle = proxyNode.data.handles.find((h) => h.connection === 'target');\n\n onConnect({\n source: node.id,\n target: proxyNode.id,\n sourceHandle: sourceHandle.id,\n targetHandle: targetHandle.id,\n });\n }\n }\n }\n }\n }, [nodesToConnect]);\n\n return <></>;\n}\n\nexport default FlowEcsEdgeProxies;\n","import { Node } from '@xyflow/react';\nimport { useContext, useEffect } from 'react';\nimport { EntityNodeData } from '../node-props';\nimport { FlowContext } from '@awesome-flow/core/abstract';\nimport { EcsFlowContext } from './ecs-flow-context';\n\nexport type FlowEcsEdgeProxiesProps = {\n nodesToConnect: Node<EntityNodeData>[];\n};\n\nfunction FlowEcsEdgeModules(props: Readonly<FlowEcsEdgeProxiesProps>) {\n const { nodesToConnect } = props;\n\n const context = useContext(FlowContext);\n const onConnect = context.useFlowStore((state: { onConnect: any }) => state.onConnect);\n\n const { ecsFlowRepository, entityRepository } = useContext(EcsFlowContext);\n\n useEffect(() => {\n for (const node of nodesToConnect) {\n const sourceHandle = node.data.handles.find((h) => h.connection === 'source');\n const entity = entityRepository.get(node.data.entity);\n\n const systemModule = ecsFlowRepository.getSystemModuleNode(entity.myProxy.entityType);\n const targetHandle = systemModule?.data.handles.find((h) => h.connection === 'target');\n\n if (targetHandle) {\n onConnect({\n source: node.id,\n target: systemModule.id,\n sourceHandle: sourceHandle.id,\n targetHandle: targetHandle.id,\n });\n }\n }\n }, [nodesToConnect]);\n\n return <></>;\n}\n\nexport default FlowEcsEdgeModules;\n","import { useMemo, useEffect, useContext } from 'react';\nimport { SystemsModuleNodeData } from '../node-props';\nimport { EcsNodeType } from '../node-types';\nimport { FlowContext } from '@awesome-flow/core/abstract';\nimport { EcsFlowContext } from './ecs-flow-context';\n\nfunction FlowEcsModules() {\n const context = useContext(FlowContext);\n const addNodes = context.useFlowStore((state) => state.addNodes);\n\n const { ecsFlowRepository, systemsModuleRepository } = useContext(EcsFlowContext);\n\n useEffect(() => {\n const modules = Array.from(systemsModuleRepository.list()).filter((m) => !!m);\n const keys = Array.from(modules.values()).map((v) => v[0]);\n\n const nodesToAdd = [];\n\n for (const element of keys) {\n if (ecsFlowRepository.getSystemModuleNode(element)) {\n continue;\n }\n\n const node = context.nodeFactory.createNodeFromType<SystemsModuleNodeData>(\n EcsNodeType.systemsModule\n );\n\n node.data.entityType = element;\n node.position = { x: 0, y: 0 };\n\n ecsFlowRepository.addSystemModuleNode(node);\n nodesToAdd.push(node);\n }\n\n if (nodesToAdd.length) {\n addNodes(nodesToAdd);\n }\n }, [systemsModuleRepository.size]);\n\n return <></>;\n}\n\nexport default FlowEcsModules;\n","import { HandleDataType, ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\nimport { IDGenerator } from '@awesome-flow/core/utils';\nimport { EcsNodeType } from '../node-types';\nimport { EntityNodeData } from '../node-props';\nimport { EcsHandleDataType } from '../handle-types';\nimport { Position } from '@xyflow/react';\n\nexport class EntityNodeTemplate implements ITemplateFactory {\n create(): NodeTemplate<EntityNodeData> {\n const data: EntityNodeData = {\n title: 'Entity',\n entity: null,\n };\n\n return {\n id: IDGenerator.template(),\n removable: false,\n type: EcsNodeType.entity,\n data,\n handles: [\n {\n dataType: EcsHandleDataType.proxy,\n position: Position.Left,\n connection: 'target',\n disabled: true,\n },\n {\n dataType: EcsHandleDataType.proxy,\n position: Position.Right,\n connection: 'source',\n disabled: true,\n },\n ],\n };\n }\n\n isHandleAllowed(): boolean {\n return false;\n }\n\n getHandleAllowedDataType(): HandleDataType {\n return EcsHandleDataType.proxy;\n }\n}\n","export enum EcsHandleDataType {\n proxy = 1 << 0,\n module = 1 << 1,\n}\n","import { HandleDataType, ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\nimport { IDGenerator } from '@awesome-flow/core/utils';\nimport { EcsNodeType } from '../node-types';\nimport { SystemsModuleNodeData } from '../node-props';\nimport { EcsHandleDataType } from '../handle-types';\nimport { Position } from '@xyflow/react';\n\nexport class SystemsModuleNodeTemplate implements ITemplateFactory {\n create(): NodeTemplate<SystemsModuleNodeData> {\n const data: SystemsModuleNodeData = {\n title: 'Systems Module',\n entityType: null,\n handles: null,\n templateId: null,\n };\n\n return {\n id: IDGenerator.template(),\n removable: false,\n type: EcsNodeType.systemsModule,\n data,\n handles: [\n {\n dataType: EcsHandleDataType.module,\n position: Position.Left,\n connection: 'target',\n disabled: true,\n },\n ],\n };\n }\n\n isHandleAllowed(): boolean {\n return false;\n }\n\n getHandleAllowedDataType(): HandleDataType {\n return EcsHandleDataType.module;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAA8B;AAevB,IAAM,qBAAiB,4BAAmC;AAAA,EAC/D,mBAAmB;AAAA,EACnB,kBAAkB;AAAA,EAClB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,yBAAyB;AAC3B,CAAC;;;ACnBM,IAAM,cAAN,MAAkB;AAAA,EACvB,OAAO,YAAY,OAA6B;AAC9C,WAAO,GAAG,MAAM,UAAU,IAAI,MAAM,SAAS;AAAA,EAC/C;AACF;;;ACDO,IAAM,oBAAN,MAAwB;AA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AC3B,OAAO;AAAA,MACP,QAAQ;AAAA,IACV;AAEA,WAAO;AAAA,MACL,IAAI,yBAAY,SAAS;AAAA,MACzB,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA,SAAS;AAAA,QACP;AAAA,UACE;AAAA,UACA,UAAU,wBAAS;AAAA,UACnB,YAAY;AAAA,UACZ,UAAU;AAAA,QACZ;AAAA,QACA;AAAA,UACE;AAAA,UACA,UAAU,wBAAS;AAAA,UACnB,YAAY;AAAA,UACZ,UAAU;AAAA,QACZ;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EAEA,kBAA2B;AACzB,WAAO;AAAA,EACT;AAAA,EAEA,2BAA2C;AACzC;AAAA,EACF;AACF;;;AE1CA,IAAAC,gBAA4B;AAI5B,IAAAC,iBAAyB;AAElB,IAAM,4BAAN,MAA4D;AAAA,EACjE,SAA8C;AAC5C,UAAM,OAA8B;AAAA,MAClC,OAAO;AAAA,MACP,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,YAAY;AAAA,IACd;AAEA,WAAO;AAAA,MACL,IAAI,0BAAY,SAAS;AAAA,MACzB,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA,SAAS;AAAA,QACP;AAAA,UACE;AAAA,UACA,UAAU,wBAAS;AAAA,UACnB,YAAY;AAAA,UACZ,UAAU;AAAA,QACZ;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EAEA,kBAA2B;AACzB,WAAO;AAAA,EACT;AAAA,EAEA,2BAA2C;AACzC;AAAA,EACF;AACF;","names":["import_react","import_react","Dagre","import_abstract","import_react","import_react","import_core","import_react","import_react","import_react","import_jsx_runtime","import_core","import_jsx_runtime","import_jsx_runtime","module","import_core","import_jsx_runtime","module","import_layout","import_core","import_react","import_core","import_core","import_react","import_core","import_react","import_core","import_react","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_core","import_react","import_jsx_runtime","import_core","import_react","import_jsx_runtime","import_core","import_react","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","EcsNodeType","import_react","import_abstract","import_jsx_runtime","import_react","import_abstract","import_jsx_runtime","import_jsx_runtime","import_react","import_abstract","import_jsx_runtime","import_jsx_runtime","EcsHandleDataType","import_react","import_utils","import_react"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/abstract/ecs-flow-context.ts","../src/utils/id-generator.ts","../src/abstract/ecs-flow-repository.ts","../src/flow/flow-ecs-state.tsx","../src/flow/flow-ecs-auto-layout.tsx","../src/flow/flow-ecs-entities.tsx","../src/nodes/node-systems-module.tsx","../src/layout/systems-module-layout.tsx","../src/components/pipeline-middleware-list.tsx","../src/components/badge-list.tsx","../src/components/formatter-camel-case.tsx","../src/nodes/node-entity.tsx","../src/layout/entity-layout.tsx","../src/components/entity-component-list.tsx","../src/components/entity-component-inspector.tsx","../src/components/object-inspector.tsx","../src/components/entity-proxy-list.tsx","../src/components/entity-subscription-list.tsx","../src/components/entity-update-counter.tsx","../src/templates/template-entity-node.ts","../src/abstract/handle-types.ts","../src/templates/template-systems-module.ts","../src/abstract/node-types.ts","../src/flow/flow-ecs-edge-proxies.tsx","../src/flow/flow-ecs-edge-modules.tsx","../src/flow/flow-ecs-modules.tsx"],"sourcesContent":["export * from './abstract/ecs-flow-context';\nexport * from './abstract/ecs-flow-repository';\n\nexport { default as FlowEcsState } from './flow/flow-ecs-state';\n\nexport { default as EntityNode } from './nodes/node-entity';\nexport { default as SystemsModuleNode } from './nodes/node-systems-module';\n\nexport * from './templates/template-entity-node';\nexport * from './templates/template-systems-module';\n\nexport * from './utils/entity-update-counter';\n\nexport * from './abstract/handle-types';\nexport * from './abstract/node-types';\nexport * from './abstract/node-props';\n","import { createContext } from 'react';\nimport { IEntityRepository } from '@awesome-ecs/abstract/entities';\nimport { ISystemsModuleRepository } from '@awesome-ecs/abstract/systems';\nimport { EntityEventsManager } from '@awesome-ecs/core/entities';\nimport { EcsFlowRepository } from './ecs-flow-repository';\nimport { IEntityUpdateCounter } from '../utils/entity-update-counter';\n\nexport type EcsFlowContextProps = {\n ecsFlowRepository: EcsFlowRepository;\n entityRepository: IEntityRepository;\n entityEventsManager: EntityEventsManager;\n entityUpdateCounter: IEntityUpdateCounter;\n systemsModuleRepository: ISystemsModuleRepository;\n};\n\nexport const EcsFlowContext = createContext<EcsFlowContextProps>(null);\n","import { IEntityProxy } from '@awesome-ecs/abstract/entities';\n\nexport class EcsIdGenerator {\n static entityProxy(proxy: IEntityProxy): string {\n return `${proxy.entityType}:${proxy.entityUid}`;\n }\n}\n","import { Node } from '@xyflow/react';\nimport { EntityTypeUid, IEntityProxy } from '@awesome-ecs/abstract/entities';\nimport { EntityNodeData, SystemsModuleNodeData } from './node-props';\nimport { EcsIdGenerator } from '../utils/id-generator';\n\nexport class EcsFlowRepository {\n private nodes: Map<string, Node>;\n\n constructor() {\n this.nodes = new Map();\n }\n\n get sizeNodes(): number {\n return this.nodes.size;\n }\n\n addSystemModuleNode(node: Node<SystemsModuleNodeData>) {\n this.nodes.set(node.data.entityType.toString(), node);\n }\n\n getSystemModuleNode(entityType: EntityTypeUid): Node<SystemsModuleNodeData> {\n return this.nodes.get(entityType.toString()) as Node<SystemsModuleNodeData>;\n }\n\n addEntityNode(node: Node<EntityNodeData>) {\n this.nodes.set(EcsIdGenerator.entityProxy(node.data.entity), node);\n }\n\n getEntityNode(entity: IEntityProxy): Node<EntityNodeData> {\n return this.nodes.get(EcsIdGenerator.entityProxy(entity)) as Node<EntityNodeData>;\n }\n\n listAllNodes(): Node[] {\n return Array.from(this.nodes.values());\n }\n}\n","import { useEffect, useContext, useState } from 'react';\nimport FlowEcsAutoLayout from './flow-ecs-auto-layout';\nimport FlowEcsEntities from './flow-ecs-entities';\nimport FlowEcsModules from './flow-ecs-modules';\nimport { EcsFlowContext } from '../abstract/ecs-flow-context';\n\nexport type FlowEcsStateProps = {\n showSystemModules: boolean;\n showEntities: boolean;\n autoLayout: boolean;\n};\n\nfunction FlowEcsState(props: Readonly<FlowEcsStateProps>) {\n const [, setUpdates] = useState(0);\n const [needsLayout, setNeedsLayout] = useState(false);\n\n const { ecsFlowRepository } = useContext(EcsFlowContext);\n\n useEffect(() => {\n setNeedsLayout(true);\n }, [ecsFlowRepository.sizeNodes]);\n\n useEffect(() => {\n setInterval(() => {\n setUpdates((updates) => updates + 1);\n }, 1000);\n }, []);\n\n return (\n <>\n {props.showSystemModules && <FlowEcsModules />}\n {props.showEntities && <FlowEcsEntities />}\n {props.autoLayout && (\n <FlowEcsAutoLayout needsLayout={needsLayout} setNeedsLayout={setNeedsLayout} />\n )}\n </>\n );\n}\n\nexport default FlowEcsState;\n","import { FlowContext } from '@awesome-flow/core/abstract';\nimport Dagre, { GraphLabel } from '@dagrejs/dagre';\nimport { Edge, Node, useReactFlow } from '@xyflow/react';\nimport { useCallback, useContext, useEffect, useMemo } from 'react';\n\nexport type EcsFlowAutoLayoutProps = {\n needsLayout: boolean;\n setNeedsLayout: (value: boolean) => void;\n};\n\nfunction FlowEcsAutoLayout(props: Readonly<EcsFlowAutoLayoutProps>) {\n const { getNodes, getEdges } = useReactFlow();\n\n const context = useContext(FlowContext);\n const setNodes = context.useFlowStore((state) => state.setNodes);\n\n const graph = useMemo(() => new Dagre.graphlib.Graph().setDefaultEdgeLabel(() => ({})), []);\n\n const getLayoutElements = useCallback(\n (nodes: Node[], edges: Edge[], options: GraphLabel) => {\n graph.setGraph(options);\n\n edges.forEach((edge) => graph.setEdge(edge.source, edge.target));\n nodes.forEach((node) => {\n if (node.measured) {\n graph.setNode(node.id, {\n width: node.measured.width,\n height: node.measured.height,\n });\n }\n });\n\n Dagre.layout(graph);\n\n return {\n nodes: nodes.map((node) => {\n const graphNode = graph.node(node.id);\n if (graphNode) {\n return { ...node, position: { x: graphNode.x, y: graphNode.y } };\n }\n\n return node;\n }),\n edges,\n };\n },\n [graph]\n );\n\n useEffect(() => {\n if (props.needsLayout) {\n const storeNodes = getNodes();\n\n if (storeNodes?.length) {\n const edges = getEdges();\n const layout = getLayoutElements(storeNodes, edges, {\n rankdir: 'LR',\n });\n\n setNodes(layout.nodes);\n }\n }\n }, [props.needsLayout]);\n\n useEffect(() => {\n if (props.needsLayout) {\n props.setNeedsLayout(false);\n }\n });\n\n return <></>;\n}\n\nexport default FlowEcsAutoLayout;\n","import { FlowContext } from '@awesome-flow/core/abstract';\nimport { useContext, useEffect, useState } from 'react';\nimport { Node } from '@xyflow/react';\nimport { EntityNodeData } from '../abstract/node-props';\nimport { EcsNodeType } from '../abstract/node-types';\nimport FlowEcsEdgeProxies from './flow-ecs-edge-proxies';\nimport FlowEcsEdgeModules from './flow-ecs-edge-modules';\nimport { EcsFlowContext } from '../abstract/ecs-flow-context';\n\nfunction FlowEcsEntities() {\n const context = useContext(FlowContext);\n const addNodes = context.useFlowStore((state) => state.addNodes);\n\n const { ecsFlowRepository, entityRepository } = useContext(EcsFlowContext);\n const [entityNodes, setEntityNodes] = useState<Node<EntityNodeData>[]>([]);\n\n useEffect(() => {\n const entities = entityRepository.listAll();\n const nodes = [];\n\n for (const entity of entities) {\n if (ecsFlowRepository.getEntityNode(entity.myProxy)) {\n continue;\n }\n\n const node = context.nodeFactory.createNodeFromType<EntityNodeData>(EcsNodeType.entity);\n\n node.data.entity = entity.myProxy;\n node.position = { x: 0, y: 0 };\n\n ecsFlowRepository.addEntityNode(node);\n nodes.push(node);\n }\n\n setEntityNodes(nodes);\n addNodes(nodes);\n }, [entityRepository.size]);\n\n return (\n <>\n <FlowEcsEdgeProxies nodesToConnect={entityNodes} />\n <FlowEcsEdgeModules nodesToConnect={entityNodes} />\n </>\n );\n}\n\nexport default FlowEcsEntities;\n","/* eslint-disable max-classes-per-file */\nimport { Node, NodeProps } from '@xyflow/react';\nimport { NodeContainer } from '@awesome-flow/core/layout';\nimport { useContext } from 'react';\nimport { Badge } from '@mantine/core';\nimport SystemsModuleLayout from '../layout/systems-module-layout';\nimport { SystemsModuleNodeData } from '../abstract/node-props';\nimport CamelCaseFormatter from '../components/formatter-camel-case';\nimport { EcsFlowContext } from '../abstract/ecs-flow-context';\n\nfunction SystemsModuleNode({ id, data, selected, type }: NodeProps<Node<SystemsModuleNodeData>>) {\n const { systemsModuleRepository } = useContext(EcsFlowContext);\n const module = systemsModuleRepository.get(data.entityType);\n\n return (\n <NodeContainer\n id={id}\n selected={selected}\n data={data}\n title={\n <Badge fullWidth color=\"indigo\" variant=\"transparent\">\n <CamelCaseFormatter value={data.entityType} />\n </Badge>\n }\n type={type}\n >\n <SystemsModuleLayout type={data.entityType} module={module} />\n </NodeContainer>\n );\n}\n\nexport default SystemsModuleNode;\n","import { EntityTypeUid, IEntity } from '@awesome-ecs/abstract/entities';\nimport { ISystemsModule, ISystemsRuntimeContext, SystemType } from '@awesome-ecs/abstract/systems';\nimport { Accordion, Text } from '@mantine/core';\nimport { useMemo } from 'react';\nimport PipelineMiddlewareList from '../components/pipeline-middleware-list';\n\nexport type NodeSystemModuleProps = {\n type: EntityTypeUid;\n module: ISystemsModule<IEntity>;\n};\n\nfunction SystemsModuleLayout(props: Readonly<NodeSystemModuleProps>) {\n const { module } = props;\n\n const runtimeContext = module['runtimeContext'] as ISystemsRuntimeContext<IEntity>;\n const { systemContext } = runtimeContext;\n\n const { status } = useMemo(() => {\n return systemContext.runtime;\n }, [systemContext.runtime.status]);\n\n const init = runtimeContext.systemPipelines.get(SystemType.initialize);\n const update = runtimeContext.systemPipelines.get(SystemType.update);\n const render = runtimeContext.systemPipelines.get(SystemType.render);\n const sync = runtimeContext.systemPipelines.get(SystemType.sync);\n\n return (\n <>\n <Text>Status: {status}</Text>\n <Accordion>\n {init && <PipelineMiddlewareList pipeline={init} label=\"Initialize\" />}\n {update && <PipelineMiddlewareList pipeline={update} label=\"Update\" />}\n {render && <PipelineMiddlewareList pipeline={render} label=\"Render\" />}\n {sync && <PipelineMiddlewareList pipeline={sync} label=\"Sync\" />}\n </Accordion>\n </>\n );\n}\n\nexport default SystemsModuleLayout;\n","import { IMiddleware, IPipeline, IPipelineContext } from '@awesome-ecs/abstract/pipelines';\nimport { Accordion, Badge, Stack } from '@mantine/core';\nimport BadgeList from './badge-list';\n\nexport type PipelineMiddlewareListProps = {\n pipeline: IPipeline<IPipelineContext>;\n label: string;\n};\n\nfunction PipelineMiddlewareList(props: Readonly<PipelineMiddlewareListProps>) {\n let middleware: IMiddleware<IPipelineContext>[] = [];\n\n if (props.pipeline) {\n middleware = props.pipeline['middleware'] as IMiddleware<IPipelineContext>[];\n }\n\n const components = middleware.map((m) => {\n return m.name || m.constructor.name;\n });\n\n return (\n <Accordion.Item key={props.label} value={props.label}>\n <Accordion.Control>\n <Badge fullWidth variant=\"light\" rightSection={components.length}>\n {props.label}\n </Badge>\n </Accordion.Control>\n <Accordion.Panel>\n <Stack>\n <BadgeList items={components} badge={{ variant: 'outline' }} />\n </Stack>\n </Accordion.Panel>\n </Accordion.Item>\n );\n}\n\nexport default PipelineMiddlewareList;\n","import { Badge, BadgeProps } from '@mantine/core';\nimport { memo } from 'react';\nimport FormatterCamelCase from './formatter-camel-case';\n\nexport type BadgeListProps = {\n items: (string | number)[];\n badge?: BadgeProps;\n};\n\nfunction BadgeList(props: Readonly<BadgeListProps>) {\n return props.items.map((value, i) => {\n return (\n <Badge key={i} {...(props.badge || [])}>\n <FormatterCamelCase value={value} />\n </Badge>\n );\n });\n}\n\nexport default memo(BadgeList);\n","import { memo, useMemo } from 'react';\n\nexport type CamelCaseFormatterProps = {\n value: string | number;\n};\n\nfunction CamelCaseFormatter(props: Readonly<CamelCaseFormatterProps>) {\n const value = useMemo(\n () => props.value?.toString().replace(/([a-z])([A-Z])/g, '$1 $2'),\n [props.value]\n );\n return value;\n}\n\nexport default memo(CamelCaseFormatter);\n","import { Node, NodeProps } from '@xyflow/react';\nimport { NodeContainer } from '@awesome-flow/core/layout';\nimport { Badge } from '@mantine/core';\nimport { useContext, useMemo } from 'react';\nimport { EntityNodeData } from '../abstract/node-props';\nimport EntityLayout from '../layout/entity-layout';\nimport CamelCaseFormatter from '../components/formatter-camel-case';\nimport { EcsFlowContext } from '../abstract/ecs-flow-context';\n\nfunction EntityNode({ id, data, selected, type }: NodeProps<Node<EntityNodeData>>) {\n const { entityRepository } = useContext(EcsFlowContext);\n const entity = useMemo(() => entityRepository.get(data.entity), [data.entity]);\n\n return (\n <NodeContainer\n id={id}\n selected={selected}\n data={data}\n title={\n <Badge fullWidth variant=\"transparent\">\n <CamelCaseFormatter value={entity.myProxy.entityType} />\n </Badge>\n }\n type={type}\n >\n <EntityLayout entity={entity} />\n </NodeContainer>\n );\n}\n\nexport default EntityNode;\n","import { IEntity } from '@awesome-ecs/abstract/entities';\nimport { Accordion, Badge, Divider, Group } from '@mantine/core';\nimport EntityComponentList from '../components/entity-component-list';\nimport EntityProxyList from '../components/entity-proxy-list';\nimport EntitySubscriptionList from '../components/entity-subscription-list';\nimport EntityUpdateCounter from '../components/entity-update-counter';\n\nexport type NodeEntityProps = {\n entity: IEntity;\n};\n\nfunction EntityLayout({ entity }: Readonly<NodeEntityProps>) {\n return (\n <>\n <Group>\n <Badge variant=\"outline\" color=\"orange\">\n {entity.myProxy.entityUid}\n </Badge>\n <EntityUpdateCounter entityUid={entity.myProxy.entityUid} />\n </Group>\n <Divider my={5} />\n <Accordion>\n <EntityComponentList entity={entity} />\n <EntityProxyList entity={entity} />\n <EntitySubscriptionList entity={entity} />\n </Accordion>\n </>\n );\n}\n\nexport default EntityLayout;\n","import { IEntity } from '@awesome-ecs/abstract/entities';\nimport { Accordion, Badge, Stack } from '@mantine/core';\nimport { memo } from 'react';\nimport EntityComponentInspector from './entity-component-inspector';\n\nexport type EntityComponentListProps = {\n entity: IEntity;\n};\n\nfunction EntityComponentList(props: Readonly<EntityComponentListProps>) {\n const components = Array.from(props.entity.components.values());\n\n return (\n <Accordion.Item key=\"components\" value=\"components\">\n <Accordion.Control>\n <Badge fullWidth variant=\"light\" rightSection={components.length}>\n Components\n </Badge>\n </Accordion.Control>\n <Accordion.Panel>\n <Stack>\n {components.map((c, i) => (\n <EntityComponentInspector component={c} key={i} />\n ))}\n </Stack>\n </Accordion.Panel>\n </Accordion.Item>\n );\n}\n\nexport default memo(EntityComponentList);\n","import { Box, Button, Collapse } from '@mantine/core';\nimport { memo, useMemo } from 'react';\nimport { IComponent } from '@awesome-ecs/abstract/components';\nimport { useDisclosure } from '@mantine/hooks';\nimport ObjectInspector from './object-inspector';\n\nexport type EntityComponentInspectorProps = {\n component: IComponent;\n};\n\nfunction EntityComponentInspector(props: Readonly<EntityComponentInspectorProps>) {\n const [opened, { toggle }] = useDisclosure(false);\n\n const buttonColor = useMemo(() => (opened ? 'light' : 'indigo'), [opened]);\n\n return (\n <Box>\n <Button variant=\"outline\" size=\"xs\" onClick={toggle} color={buttonColor} fullWidth>\n {props.component.componentType}\n </Button>\n\n <Collapse in={opened}>{opened && <ObjectInspector data={props.component} />}</Collapse>\n </Box>\n );\n}\n\nexport default memo(EntityComponentInspector);\n","import { useComputedColorScheme } from '@mantine/core';\nimport { memo, useMemo } from 'react';\nimport { Inspector } from 'react-inspector';\n\nexport type ObjectInspectorProps = {\n data: any;\n};\n\nfunction ObjectInspector(props: Readonly<ObjectInspectorProps>) {\n const colorScheme = useComputedColorScheme();\n\n const theme = useMemo(\n () => (colorScheme === 'dark' ? 'chromeDark' : 'chromeLight'),\n [colorScheme]\n );\n\n return <Inspector table={false} theme={theme} data={props.data} />;\n}\n\nexport default memo(ObjectInspector);\n","import { IEntity } from '@awesome-ecs/abstract/entities';\nimport { Accordion, Badge, Stack } from '@mantine/core';\nimport { memo } from 'react';\nimport BadgeList from './badge-list';\nimport { EcsIdGenerator } from '../utils/id-generator';\n\nexport type EntityProxyListProps = {\n entity: IEntity;\n};\n\nfunction EntityProxyList(props: Readonly<EntityProxyListProps>) {\n const proxies = Array.from(props.entity.proxies.values()).map((c) => c.values());\n const items = proxies.map((p) => Array.from(p).map((k) => EcsIdGenerator.entityProxy(k))).flat();\n\n return (\n <Accordion.Item key=\"proxies\" value=\"proxies\">\n <Accordion.Control>\n <Badge fullWidth variant=\"light\" rightSection={items.length}>\n Proxies\n </Badge>\n </Accordion.Control>\n <Accordion.Panel>\n <Stack>\n <BadgeList items={items} badge={{ variant: 'outline' }} />\n </Stack>\n </Accordion.Panel>\n </Accordion.Item>\n );\n}\n\nexport default memo(EntityProxyList);\n","import { IEntity } from '@awesome-ecs/abstract/entities';\nimport { Accordion, Badge, Stack } from '@mantine/core';\nimport { memo, useContext } from 'react';\nimport BadgeList from './badge-list';\nimport { EcsFlowContext } from '../abstract/ecs-flow-context';\n\nexport type EntitySubscriptionListProps = {\n entity: IEntity;\n};\n\nfunction EntitySubscriptionList(props: Readonly<EntitySubscriptionListProps>) {\n const { entityEventsManager } = useContext(EcsFlowContext);\n const subscriptions = entityEventsManager.getSubscriptionsForEntity(props.entity.myProxy);\n\n return (\n <Accordion.Item key=\"subscriptions\" value=\"subscriptions\">\n <Accordion.Control>\n <Badge fullWidth variant=\"light\" rightSection={subscriptions.length}>\n Events\n </Badge>\n </Accordion.Control>\n <Accordion.Panel>\n <Stack>\n <BadgeList items={subscriptions} badge={{ variant: 'outline' }} />\n </Stack>\n </Accordion.Panel>\n </Accordion.Item>\n );\n}\n\nexport default memo(EntitySubscriptionList);\n","import { EntityUid } from '@awesome-ecs/abstract/entities';\nimport { Badge } from '@mantine/core';\nimport { memo, useContext, useEffect, useState } from 'react';\nimport { EcsFlowContext } from '../abstract/ecs-flow-context';\n\nexport type EntityUpdateCounterProps = {\n entityUid: EntityUid;\n};\n\nfunction EntityUpdateCounter(props: Readonly<EntityUpdateCounterProps>) {\n const [, setRefresh] = useState(0);\n\n const { entityUpdateCounter } = useContext(EcsFlowContext);\n\n const updates = entityUpdateCounter.getUpdateCount(props.entityUid) || 0;\n const removes = entityUpdateCounter.getRemoveCount(props.entityUid) || 0;\n\n useEffect(() => {\n const interval = setInterval(() => {\n setRefresh((refresh) => refresh + 1);\n }, 1000);\n\n return () => {\n console.log('CLEAR INTERVAL');\n clearInterval(interval);\n };\n }, []);\n\n return (\n <>\n <Badge variant=\"light\">{updates}</Badge>\n <Badge variant=\"light\" color=\"orange\">\n {removes}\n </Badge>\n </>\n );\n}\n\nexport default memo(EntityUpdateCounter);\n","import { HandleDataType, ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\nimport { IDGenerator } from '@awesome-flow/core/utils';\nimport { Position } from '@xyflow/react';\nimport { EcsNodeType } from '../abstract/node-types';\nimport { EntityNodeData } from '../abstract/node-props';\nimport { EcsHandleDataType } from '../abstract/handle-types';\n\nexport class EntityNodeTemplate implements ITemplateFactory {\n create(): NodeTemplate<EntityNodeData> {\n const data: EntityNodeData = {\n title: 'Entity',\n entity: null,\n };\n\n return {\n id: IDGenerator.template(),\n removable: false,\n type: EcsNodeType.entity,\n data,\n handles: [\n {\n dataType: EcsHandleDataType.proxy,\n position: Position.Left,\n connection: 'target',\n disabled: true,\n },\n {\n dataType: EcsHandleDataType.proxy,\n position: Position.Right,\n connection: 'source',\n disabled: true,\n },\n ],\n };\n }\n\n isHandleAllowed(): boolean {\n return false;\n }\n\n getHandleAllowedDataType(): HandleDataType {\n return EcsHandleDataType.proxy;\n }\n}\n","export enum EcsHandleDataType {\n proxy = 1 << 0,\n module = 1 << 1,\n}\n","import { HandleDataType, ITemplateFactory, NodeTemplate } from '@awesome-flow/core/abstract';\nimport { IDGenerator } from '@awesome-flow/core/utils';\nimport { Position } from '@xyflow/react';\nimport { EcsNodeType } from '../abstract/node-types';\nimport { SystemsModuleNodeData } from '../abstract/node-props';\nimport { EcsHandleDataType } from '../abstract/handle-types';\n\nexport class SystemsModuleNodeTemplate implements ITemplateFactory {\n create(): NodeTemplate<SystemsModuleNodeData> {\n const data: SystemsModuleNodeData = {\n title: 'Systems Module',\n entityType: null,\n handles: null,\n templateId: null,\n };\n\n return {\n id: IDGenerator.template(),\n removable: false,\n type: EcsNodeType.systemsModule,\n data,\n handles: [\n {\n dataType: EcsHandleDataType.module,\n position: Position.Left,\n connection: 'target',\n disabled: true,\n },\n ],\n };\n }\n\n isHandleAllowed(): boolean {\n return false;\n }\n\n getHandleAllowedDataType(): HandleDataType {\n return EcsHandleDataType.module;\n }\n}\n","import { NodeTypes } from '@xyflow/react';\nimport SystemsModuleNode from '../nodes/node-systems-module';\nimport EntityNode from '../nodes/node-entity';\nimport { EntityNodeTemplate } from '../templates/template-entity-node';\nimport { SystemsModuleNodeTemplate } from '../templates/template-systems-module';\n\nexport enum EcsNodeType {\n systemsModule = 'systems-module-node',\n entity = 'entity-node',\n}\n\nexport const ecsNodeTypes = {\n [EcsNodeType.systemsModule]: SystemsModuleNode,\n [EcsNodeType.entity]: EntityNode,\n} satisfies NodeTypes;\n\nexport const ecsNodeTemplates = {\n [EcsNodeType.entity]: new EntityNodeTemplate(),\n [EcsNodeType.systemsModule]: new SystemsModuleNodeTemplate(),\n};\n","import { Node } from '@xyflow/react';\nimport { useContext, useEffect } from 'react';\nimport { FlowContext } from '@awesome-flow/core/abstract';\nimport { EntityNodeData } from '../abstract/node-props';\nimport { EcsFlowContext } from '../abstract/ecs-flow-context';\n\nexport type FlowEcsEdgeProxiesProps = {\n nodesToConnect: Node<EntityNodeData>[];\n};\n\nfunction FlowEcsEdgeProxies(props: Readonly<FlowEcsEdgeProxiesProps>) {\n const { nodesToConnect } = props;\n\n const context = useContext(FlowContext);\n const onConnect = context.useFlowStore((state: { onConnect: any }) => state.onConnect);\n\n const { ecsFlowRepository, entityRepository } = useContext(EcsFlowContext);\n\n useEffect(() => {\n for (const node of nodesToConnect) {\n const sourceHandle = node.data.handles.find((h) => h.connection === 'source');\n const entity = entityRepository.get(node.data.entity);\n\n for (const [, proxyMap] of entity.proxies) {\n for (const proxy of proxyMap.values()) {\n const proxyNode = ecsFlowRepository.getEntityNode(proxy);\n\n if (proxyNode) {\n const targetHandle = proxyNode.data.handles.find((h) => h.connection === 'target');\n\n onConnect({\n source: node.id,\n target: proxyNode.id,\n sourceHandle: sourceHandle.id,\n targetHandle: targetHandle.id,\n });\n }\n }\n }\n }\n }, [nodesToConnect]);\n\n return <></>;\n}\n\nexport default FlowEcsEdgeProxies;\n","import { Node } from '@xyflow/react';\nimport { useContext, useEffect } from 'react';\nimport { FlowContext } from '@awesome-flow/core/abstract';\nimport { EntityNodeData } from '../abstract/node-props';\nimport { EcsFlowContext } from '../abstract/ecs-flow-context';\n\nexport type FlowEcsEdgeProxiesProps = {\n nodesToConnect: Node<EntityNodeData>[];\n};\n\nfunction FlowEcsEdgeModules(props: Readonly<FlowEcsEdgeProxiesProps>) {\n const { nodesToConnect } = props;\n\n const context = useContext(FlowContext);\n const onConnect = context.useFlowStore((state: { onConnect: any }) => state.onConnect);\n\n const { ecsFlowRepository, entityRepository } = useContext(EcsFlowContext);\n\n useEffect(() => {\n for (const node of nodesToConnect) {\n const sourceHandle = node.data.handles.find((h) => h.connection === 'source');\n const entity = entityRepository.get(node.data.entity);\n\n const systemModule = ecsFlowRepository.getSystemModuleNode(entity.myProxy.entityType);\n const targetHandle = systemModule?.data.handles.find((h) => h.connection === 'target');\n\n if (targetHandle) {\n onConnect({\n source: node.id,\n target: systemModule.id,\n sourceHandle: sourceHandle.id,\n targetHandle: targetHandle.id,\n });\n }\n }\n }, [nodesToConnect]);\n\n return <></>;\n}\n\nexport default FlowEcsEdgeModules;\n","import { useEffect, useContext } from 'react';\nimport { FlowContext } from '@awesome-flow/core/abstract';\nimport { SystemsModuleNodeData } from '../abstract/node-props';\nimport { EcsNodeType } from '../abstract/node-types';\nimport { EcsFlowContext } from '../abstract/ecs-flow-context';\n\nfunction FlowEcsModules() {\n const context = useContext(FlowContext);\n const addNodes = context.useFlowStore((state) => state.addNodes);\n\n const { ecsFlowRepository, systemsModuleRepository } = useContext(EcsFlowContext);\n\n useEffect(() => {\n const modules = Array.from(systemsModuleRepository.list()).filter((m) => !!m);\n const keys = Array.from(modules.values()).map((v) => v[0]);\n\n const nodesToAdd = [];\n\n for (const element of keys) {\n if (ecsFlowRepository.getSystemModuleNode(element)) {\n continue;\n }\n\n const node = context.nodeFactory.createNodeFromType<SystemsModuleNodeData>(\n EcsNodeType.systemsModule\n );\n\n node.data.entityType = element;\n node.position = { x: 0, y: 0 };\n\n ecsFlowRepository.addSystemModuleNode(node);\n nodesToAdd.push(node);\n }\n\n if (nodesToAdd.length) {\n addNodes(nodesToAdd);\n }\n }, [systemsModuleRepository.size]);\n\n return <></>;\n}\n\nexport default FlowEcsModules;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAA8B;AAevB,IAAM,qBAAiB,4BAAmC,IAAI;;;ACb9D,IAAM,iBAAN,MAAqB;AAAA,EAC1B,OAAO,YAAY,OAA6B;AAC9C,WAAO,GAAG,MAAM,UAAU,IAAI,MAAM,SAAS;AAAA,EAC/C;AACF;;;ACDO,IAAM,oBAAN,MAAwB;AAAA,EACrB;AAAA,EAER,cAAc;AACZ,SAAK,QAAQ,oBAAI,IAAI;AAAA,EACvB;AAAA,EAEA,IAAI,YAAoB;AACtB,WAAO,KAAK,MAAM;AAAA,EACpB;AAAA,EAEA,oBAAoB,MAAmC;AACrD,SAAK,MAAM,IAAI,KAAK,KAAK,WAAW,SAAS,GAAG,IAAI;AAAA,EACtD;AAAA,EAEA,oBAAoB,YAAwD;AAC1E,WAAO,KAAK,MAAM,IAAI,WAAW,SAAS,CAAC;AAAA,EAC7C;AAAA,EAEA,cAAc,MAA4B;AACxC,SAAK,MAAM,IAAI,eAAe,YAAY,KAAK,KAAK,MAAM,GAAG,IAAI;AAAA,EACnE;AAAA,EAEA,cAAc,QAA4C;AACxD,WAAO,KAAK,MAAM,IAAI,eAAe,YAAY,MAAM,CAAC;AAAA,EAC1D;AAAA,EAEA,eAAuB;AACrB,WAAO,MAAM,KAAK,KAAK,MAAM,OAAO,CAAC;AAAA,EACvC;AACF;;;ACnCA,IAAAA,iBAAgD;;;ACAhD,sBAA4B;AAC5B,mBAAkC;AAClC,IAAAC,gBAA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AAC;AAEhC,gCAAU,MAAM;AACd,gBAAY,MAAM;AAChB,iBAAW,CAAC,YAAY,UAAU,CAAC;AAAA,IACrC,GAAG,GAAI;AAAA,EACT,GAAG,CAAC,CAAC;AAEL,SACE,gFACG;AAAA,UAAM,qBAAqB,8CAAC,4BAAe;AAAA,IAC3C,MAAM,gBAAgB,8CAAC,6BAAgB;AAAA,IACvC,MAAM,cACL,8CAAC,gCAAkB,aAA0B,gBAAgC;AAAA,KAEjF;AAEJ;AAEA,IAAO,yBAAQ;","names":["import_react","import_react","Dagre","import_abstract","import_react","import_react","import_core","import_core","import_react","import_core","import_react","import_react","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","module","import_jsx_runtime","module","import_layout","import_core","import_react","import_core","import_core","import_react","import_core","import_react","import_core","import_react","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_core","import_react","import_jsx_runtime","import_core","import_react","import_jsx_runtime","import_core","import_react","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_react","EcsHandleDataType","import_utils","import_react","EcsNodeType","import_react","import_abstract","import_jsx_runtime","import_react","import_abstract","import_jsx_runtime","import_jsx_runtime","import_react","import_abstract","import_jsx_runtime","import_jsx_runtime"]}