@awesome-flow/ecs 0.0.0 → 0.2.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/LICENSE.md +201 -0
- package/dist/index.cjs +9 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +9 -10
- package/dist/index.js.map +1 -1
- package/package.json +6 -5
package/LICENSE.md
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2022 privatebytes
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/dist/index.cjs
CHANGED
|
@@ -418,13 +418,13 @@ function FlowEcsEdgeProxies(props) {
|
|
|
418
418
|
const { ecsFlowRepository, entityRepository } = (0, import_react15.useContext)(EcsFlowContext);
|
|
419
419
|
(0, import_react15.useEffect)(() => {
|
|
420
420
|
for (const node of nodesToConnect) {
|
|
421
|
-
const sourceHandle = node.data.handles.find((h) => h.
|
|
421
|
+
const sourceHandle = node.data.handles.find((h) => h.connection === "source");
|
|
422
422
|
const entity = entityRepository.get(node.data.entity);
|
|
423
423
|
for (const [, proxyMap] of entity.proxies) {
|
|
424
424
|
for (const proxy of proxyMap.values()) {
|
|
425
425
|
const proxyNode = ecsFlowRepository.getEntityNode(proxy);
|
|
426
426
|
if (proxyNode) {
|
|
427
|
-
const targetHandle = proxyNode.data.handles.find((h) => h.
|
|
427
|
+
const targetHandle = proxyNode.data.handles.find((h) => h.connection === "target");
|
|
428
428
|
onConnect({
|
|
429
429
|
source: node.id,
|
|
430
430
|
target: proxyNode.id,
|
|
@@ -451,10 +451,10 @@ function FlowEcsEdgeModules(props) {
|
|
|
451
451
|
const { ecsFlowRepository, entityRepository } = (0, import_react16.useContext)(EcsFlowContext);
|
|
452
452
|
(0, import_react16.useEffect)(() => {
|
|
453
453
|
for (const node of nodesToConnect) {
|
|
454
|
-
const sourceHandle = node.data.handles.find((h) => h.
|
|
454
|
+
const sourceHandle = node.data.handles.find((h) => h.connection === "source");
|
|
455
455
|
const entity = entityRepository.get(node.data.entity);
|
|
456
456
|
const systemModule = ecsFlowRepository.getSystemModuleNode(entity.myProxy.entityType);
|
|
457
|
-
const targetHandle = systemModule?.data.handles.find((h) => h.
|
|
457
|
+
const targetHandle = systemModule?.data.handles.find((h) => h.connection === "target");
|
|
458
458
|
if (targetHandle) {
|
|
459
459
|
onConnect({
|
|
460
460
|
source: node.id,
|
|
@@ -462,7 +462,6 @@ function FlowEcsEdgeModules(props) {
|
|
|
462
462
|
sourceHandle: sourceHandle.id,
|
|
463
463
|
targetHandle: targetHandle.id
|
|
464
464
|
});
|
|
465
|
-
console.log("CONNECTING MODULE", node.id, systemModule.id);
|
|
466
465
|
}
|
|
467
466
|
}
|
|
468
467
|
}, [nodesToConnect]);
|
|
@@ -581,13 +580,13 @@ var EntityNodeTemplate = class {
|
|
|
581
580
|
{
|
|
582
581
|
dataType: 1 /* proxy */,
|
|
583
582
|
position: import_react20.Position.Left,
|
|
584
|
-
|
|
583
|
+
connection: "target",
|
|
585
584
|
disabled: true
|
|
586
585
|
},
|
|
587
586
|
{
|
|
588
587
|
dataType: 1 /* proxy */,
|
|
589
588
|
position: import_react20.Position.Right,
|
|
590
|
-
|
|
589
|
+
connection: "source",
|
|
591
590
|
disabled: true
|
|
592
591
|
}
|
|
593
592
|
]
|
|
@@ -597,7 +596,7 @@ var EntityNodeTemplate = class {
|
|
|
597
596
|
return false;
|
|
598
597
|
}
|
|
599
598
|
getHandleAllowedDataType() {
|
|
600
|
-
return
|
|
599
|
+
return 1 /* proxy */;
|
|
601
600
|
}
|
|
602
601
|
};
|
|
603
602
|
|
|
@@ -621,7 +620,7 @@ var SystemsModuleNodeTemplate = class {
|
|
|
621
620
|
{
|
|
622
621
|
dataType: 2 /* module */,
|
|
623
622
|
position: import_react21.Position.Left,
|
|
624
|
-
|
|
623
|
+
connection: "target",
|
|
625
624
|
disabled: true
|
|
626
625
|
}
|
|
627
626
|
]
|
|
@@ -631,7 +630,7 @@ var SystemsModuleNodeTemplate = class {
|
|
|
631
630
|
return false;
|
|
632
631
|
}
|
|
633
632
|
getHandleAllowedDataType() {
|
|
634
|
-
return
|
|
633
|
+
return 2 /* module */;
|
|
635
634
|
}
|
|
636
635
|
};
|
|
637
636
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/index.cjs.map
CHANGED
|
@@ -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.type === '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.type === '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.type === '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.type === '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 console.log('CONNECTING MODULE', node.id, systemModule.id);\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 { ITemplateFactory, NodeTemplate, HandleDataTypeFlag } 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 type: 'target',\n disabled: true,\n },\n {\n dataType: EcsHandleDataType.proxy,\n position: Position.Right,\n type: 'source',\n disabled: true,\n },\n ],\n };\n }\n\n isHandleAllowed(): boolean {\n return false;\n }\n\n getHandleAllowedDataType(): HandleDataTypeFlag {\n return undefined;\n }\n}\n","export enum EcsHandleDataType {\n proxy = 1 << 0,\n module = 1 << 1,\n}\n","import { ITemplateFactory, NodeTemplate, HandleDataTypeFlag } 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 type: 'target',\n disabled: true,\n },\n ],\n };\n }\n\n isHandleAllowed(): boolean {\n return false;\n }\n\n getHandleAllowedDataType(): HandleDataTypeFlag {\n return undefined;\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;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,I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AAA,QACZ;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EAEA,kBAA2B;AACzB,WAAO;AAAA,EACT;AAAA,EAEA,2BAA+C;AAC7C,WAAO;AAAA,EACT;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,MAAM;AAAA,UACN,UAAU;AAAA,QACZ;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EAEA,kBAA2B;AACzB,WAAO;AAAA,EACT;AAAA,EAEA,2BAA+C;AAC7C,WAAO;AAAA,EACT;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/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,EACl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ACDrB,IAAK,oBAAL,kBAAKC,uBAAL;AACL,EAAAA,sCAAA,WAAQ,KAAR;AACA,EAAAA,sCAAA,YAAS,KAAT;AAFU,SAAAA;AAAA,GAAA;;;ADKZ,IAAAC,iBAAyB;AAElB,IAAM,qBAAN,MAAqD;AAAA,EAC1D,SAAuC;AACrC,UAAM,OAAuB;AAAA,MAC3B,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"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { Node, NodeProps } from '@xyflow/react';
|
|
3
3
|
import { EntityTypeUid, IEntityProxy, EntityUid, IEntityRepository } from '@awesome-ecs/abstract/entities';
|
|
4
|
-
import { BasicNodeData, ITemplateFactory, NodeTemplate,
|
|
4
|
+
import { BasicNodeData, ITemplateFactory, NodeTemplate, HandleDataType } from '@awesome-flow/core/abstract';
|
|
5
5
|
import { ISystemsModuleRepository } from '@awesome-ecs/abstract/systems';
|
|
6
6
|
import { EntityEventsManager } from '@awesome-ecs/core/entities';
|
|
7
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
@@ -52,13 +52,13 @@ declare function SystemsModuleNode({ id, data, selected, type }: NodeProps<Node<
|
|
|
52
52
|
declare class EntityNodeTemplate implements ITemplateFactory {
|
|
53
53
|
create(): NodeTemplate<EntityNodeData>;
|
|
54
54
|
isHandleAllowed(): boolean;
|
|
55
|
-
getHandleAllowedDataType():
|
|
55
|
+
getHandleAllowedDataType(): HandleDataType;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
declare class SystemsModuleNodeTemplate implements ITemplateFactory {
|
|
59
59
|
create(): NodeTemplate<SystemsModuleNodeData>;
|
|
60
60
|
isHandleAllowed(): boolean;
|
|
61
|
-
getHandleAllowedDataType():
|
|
61
|
+
getHandleAllowedDataType(): HandleDataType;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
declare enum EcsHandleDataType {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { Node, NodeProps } from '@xyflow/react';
|
|
3
3
|
import { EntityTypeUid, IEntityProxy, EntityUid, IEntityRepository } from '@awesome-ecs/abstract/entities';
|
|
4
|
-
import { BasicNodeData, ITemplateFactory, NodeTemplate,
|
|
4
|
+
import { BasicNodeData, ITemplateFactory, NodeTemplate, HandleDataType } from '@awesome-flow/core/abstract';
|
|
5
5
|
import { ISystemsModuleRepository } from '@awesome-ecs/abstract/systems';
|
|
6
6
|
import { EntityEventsManager } from '@awesome-ecs/core/entities';
|
|
7
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
@@ -52,13 +52,13 @@ declare function SystemsModuleNode({ id, data, selected, type }: NodeProps<Node<
|
|
|
52
52
|
declare class EntityNodeTemplate implements ITemplateFactory {
|
|
53
53
|
create(): NodeTemplate<EntityNodeData>;
|
|
54
54
|
isHandleAllowed(): boolean;
|
|
55
|
-
getHandleAllowedDataType():
|
|
55
|
+
getHandleAllowedDataType(): HandleDataType;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
declare class SystemsModuleNodeTemplate implements ITemplateFactory {
|
|
59
59
|
create(): NodeTemplate<SystemsModuleNodeData>;
|
|
60
60
|
isHandleAllowed(): boolean;
|
|
61
|
-
getHandleAllowedDataType():
|
|
61
|
+
getHandleAllowedDataType(): HandleDataType;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
declare enum EcsHandleDataType {
|
package/dist/index.js
CHANGED
|
@@ -374,13 +374,13 @@ function FlowEcsEdgeProxies(props) {
|
|
|
374
374
|
const { ecsFlowRepository, entityRepository } = useContext6(EcsFlowContext);
|
|
375
375
|
useEffect3(() => {
|
|
376
376
|
for (const node of nodesToConnect) {
|
|
377
|
-
const sourceHandle = node.data.handles.find((h) => h.
|
|
377
|
+
const sourceHandle = node.data.handles.find((h) => h.connection === "source");
|
|
378
378
|
const entity = entityRepository.get(node.data.entity);
|
|
379
379
|
for (const [, proxyMap] of entity.proxies) {
|
|
380
380
|
for (const proxy of proxyMap.values()) {
|
|
381
381
|
const proxyNode = ecsFlowRepository.getEntityNode(proxy);
|
|
382
382
|
if (proxyNode) {
|
|
383
|
-
const targetHandle = proxyNode.data.handles.find((h) => h.
|
|
383
|
+
const targetHandle = proxyNode.data.handles.find((h) => h.connection === "target");
|
|
384
384
|
onConnect({
|
|
385
385
|
source: node.id,
|
|
386
386
|
target: proxyNode.id,
|
|
@@ -407,10 +407,10 @@ function FlowEcsEdgeModules(props) {
|
|
|
407
407
|
const { ecsFlowRepository, entityRepository } = useContext7(EcsFlowContext);
|
|
408
408
|
useEffect4(() => {
|
|
409
409
|
for (const node of nodesToConnect) {
|
|
410
|
-
const sourceHandle = node.data.handles.find((h) => h.
|
|
410
|
+
const sourceHandle = node.data.handles.find((h) => h.connection === "source");
|
|
411
411
|
const entity = entityRepository.get(node.data.entity);
|
|
412
412
|
const systemModule = ecsFlowRepository.getSystemModuleNode(entity.myProxy.entityType);
|
|
413
|
-
const targetHandle = systemModule?.data.handles.find((h) => h.
|
|
413
|
+
const targetHandle = systemModule?.data.handles.find((h) => h.connection === "target");
|
|
414
414
|
if (targetHandle) {
|
|
415
415
|
onConnect({
|
|
416
416
|
source: node.id,
|
|
@@ -418,7 +418,6 @@ function FlowEcsEdgeModules(props) {
|
|
|
418
418
|
sourceHandle: sourceHandle.id,
|
|
419
419
|
targetHandle: targetHandle.id
|
|
420
420
|
});
|
|
421
|
-
console.log("CONNECTING MODULE", node.id, systemModule.id);
|
|
422
421
|
}
|
|
423
422
|
}
|
|
424
423
|
}, [nodesToConnect]);
|
|
@@ -537,13 +536,13 @@ var EntityNodeTemplate = class {
|
|
|
537
536
|
{
|
|
538
537
|
dataType: 1 /* proxy */,
|
|
539
538
|
position: Position.Left,
|
|
540
|
-
|
|
539
|
+
connection: "target",
|
|
541
540
|
disabled: true
|
|
542
541
|
},
|
|
543
542
|
{
|
|
544
543
|
dataType: 1 /* proxy */,
|
|
545
544
|
position: Position.Right,
|
|
546
|
-
|
|
545
|
+
connection: "source",
|
|
547
546
|
disabled: true
|
|
548
547
|
}
|
|
549
548
|
]
|
|
@@ -553,7 +552,7 @@ var EntityNodeTemplate = class {
|
|
|
553
552
|
return false;
|
|
554
553
|
}
|
|
555
554
|
getHandleAllowedDataType() {
|
|
556
|
-
return
|
|
555
|
+
return 1 /* proxy */;
|
|
557
556
|
}
|
|
558
557
|
};
|
|
559
558
|
|
|
@@ -577,7 +576,7 @@ var SystemsModuleNodeTemplate = class {
|
|
|
577
576
|
{
|
|
578
577
|
dataType: 2 /* module */,
|
|
579
578
|
position: Position2.Left,
|
|
580
|
-
|
|
579
|
+
connection: "target",
|
|
581
580
|
disabled: true
|
|
582
581
|
}
|
|
583
582
|
]
|
|
@@ -587,7 +586,7 @@ var SystemsModuleNodeTemplate = class {
|
|
|
587
586
|
return false;
|
|
588
587
|
}
|
|
589
588
|
getHandleAllowedDataType() {
|
|
590
|
-
return
|
|
589
|
+
return 2 /* module */;
|
|
591
590
|
}
|
|
592
591
|
};
|
|
593
592
|
export {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../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":["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.type === '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.type === '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.type === '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.type === '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 console.log('CONNECTING MODULE', node.id, systemModule.id);\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 { ITemplateFactory, NodeTemplate, HandleDataTypeFlag } 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 type: 'target',\n disabled: true,\n },\n {\n dataType: EcsHandleDataType.proxy,\n position: Position.Right,\n type: 'source',\n disabled: true,\n },\n ],\n };\n }\n\n isHandleAllowed(): boolean {\n return false;\n }\n\n getHandleAllowedDataType(): HandleDataTypeFlag {\n return undefined;\n }\n}\n","export enum EcsHandleDataType {\n proxy = 1 << 0,\n module = 1 << 1,\n}\n","import { ITemplateFactory, NodeTemplate, HandleDataTypeFlag } 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 type: 'target',\n disabled: true,\n },\n ],\n };\n }\n\n isHandleAllowed(): boolean {\n return false;\n }\n\n getHandleAllowedDataType(): HandleDataTypeFlag {\n return undefined;\n }\n}\n"],"mappings":";AAAA,SAAS,qBAAqB;AAevB,IAAM,iBAAiB,cAAmC;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;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,IAA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AA,QACP;AAAA,UACE;AAAA,UACA,UAAU,SAAS;AAAA,UACnB,MAAM;AAAA,UACN,UAAU;AAAA,QACZ;AAAA,QACA;AAAA,UACE;AAAA,UACA,UAAU,SAAS;AAAA,UACnB,MAAM;AAAA,UACN,UAAU;AAAA,QACZ;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EAEA,kBAA2B;AACzB,WAAO;AAAA,EACT;AAAA,EAEA,2BAA+C;AAC7C,WAAO;AAAA,EACT;AACF;;;AE1CA,SAAS,eAAAC,oBAAmB;AAI5B,SAAS,YAAAC,iBAAgB;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,IAAIC,aAAY,SAAS;AAAA,MACzB,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA,SAAS;AAAA,QACP;AAAA,UACE;AAAA,UACA,UAAUD,UAAS;AAAA,UACnB,MAAM;AAAA,UACN,UAAU;AAAA,QACZ;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EAEA,kBAA2B;AACzB,WAAO;AAAA,EACT;AAAA,EAEA,2BAA+C;AAC7C,WAAO;AAAA,EACT;AACF;","names":["useEffect","useContext","useState","FlowContext","useContext","useEffect","useState","useContext","Accordion","useMemo","memo","useMemo","jsx","memo","Badge","jsx","Fragment","jsx","jsxs","useMemo","Accordion","Badge","jsx","useContext","Badge","NodeContainer","Badge","useContext","useMemo","Accordion","Badge","Accordion","Badge","Stack","memo","memo","useMemo","memo","useMemo","jsx","jsx","jsxs","useMemo","memo","jsx","jsxs","Accordion","Badge","Stack","memo","Accordion","Badge","Stack","memo","jsx","jsxs","Accordion","Badge","Stack","memo","Accordion","Badge","Stack","memo","useContext","jsx","jsxs","useContext","Accordion","Badge","Stack","memo","Badge","memo","useContext","useEffect","Fragment","jsx","jsxs","useContext","useEffect","Badge","memo","Fragment","jsx","jsxs","Badge","Accordion","jsx","useContext","useMemo","NodeContainer","Badge","EcsNodeType","useContext","useEffect","FlowContext","Fragment","jsx","useContext","FlowContext","useEffect","useContext","useEffect","FlowContext","Fragment","jsx","useContext","FlowContext","useEffect","Fragment","jsx","jsxs","useContext","FlowContext","useState","useEffect","useEffect","useContext","FlowContext","Fragment","jsx","useContext","FlowContext","useEffect","Fragment","jsx","jsxs","useState","useContext","useEffect","EcsHandleDataType","IDGenerator","Position","IDGenerator"]}
|
|
1
|
+
{"version":3,"sources":["../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":["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":";A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A,MACA,SAAS;AAAA,QACP;AAAA,UACE;AAAA,UACA,UAAUD,UAAS;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":["useEffect","useContext","useState","FlowContext","useContext","useEffect","useState","useContext","Accordion","useMemo","memo","useMemo","jsx","memo","Badge","jsx","Fragment","jsx","jsxs","useMemo","Accordion","Badge","jsx","useContext","Badge","NodeContainer","Badge","useContext","useMemo","Accordion","Badge","Accordion","Badge","Stack","memo","memo","useMemo","memo","useMemo","jsx","jsx","jsxs","useMemo","memo","jsx","jsxs","Accordion","Badge","Stack","memo","Accordion","Badge","Stack","memo","jsx","jsxs","Accordion","Badge","Stack","memo","Accordion","Badge","Stack","memo","useContext","jsx","jsxs","useContext","Accordion","Badge","Stack","memo","Badge","memo","useContext","useEffect","Fragment","jsx","jsxs","useContext","useEffect","Badge","memo","Fragment","jsx","jsxs","Badge","Accordion","jsx","useContext","useMemo","NodeContainer","Badge","EcsNodeType","useContext","useEffect","FlowContext","Fragment","jsx","useContext","FlowContext","useEffect","useContext","useEffect","FlowContext","Fragment","jsx","useContext","FlowContext","useEffect","Fragment","jsx","jsxs","useContext","FlowContext","useState","useEffect","useEffect","useContext","FlowContext","Fragment","jsx","useContext","FlowContext","useEffect","Fragment","jsx","jsxs","useState","useContext","useEffect","EcsHandleDataType","IDGenerator","Position","IDGenerator"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awesome-flow/ecs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "The Flow package for Awesome ECS. Provides basic components to map ECS objects.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
"ts:watch": "npx tsc --noEmit --incremental --watch"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@awesome-
|
|
15
|
-
"@awesome-ecs/core": "^0.19.0",
|
|
16
|
-
"@awesome-flow/core": "*"
|
|
14
|
+
"@awesome-flow/core": "^0.2.0"
|
|
17
15
|
},
|
|
18
16
|
"peerDependencies": {
|
|
17
|
+
"@awesome-ecs/abstract": "*",
|
|
18
|
+
"@awesome-ecs/core": "*",
|
|
19
19
|
"@dagrejs/dagre": "*",
|
|
20
20
|
"@mantine/core": "*",
|
|
21
21
|
"@mantine/hooks": "*",
|
|
@@ -69,5 +69,6 @@
|
|
|
69
69
|
"bugs": {
|
|
70
70
|
"url": "https://github.com/privatebytes/awesome-flow/issues"
|
|
71
71
|
},
|
|
72
|
-
"homepage": "https://github.com/privatebytes/awesome-flow#readme"
|
|
72
|
+
"homepage": "https://github.com/privatebytes/awesome-flow#readme",
|
|
73
|
+
"gitHead": "88439e016f400fe93fe8d94419d7bb8eb17ce666"
|
|
73
74
|
}
|