@awesome-flow/ecs 0.14.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/canvas/index.cjs +1 -1
- package/dist/canvas/index.d.cts +1 -1
- package/dist/canvas/index.d.mts +1 -1
- package/dist/canvas/index.mjs +1 -1
- package/dist/{canvas-DlWcWu05.cjs → canvas-WWAJ6C2l.cjs} +11 -11
- package/dist/canvas-WWAJ6C2l.cjs.map +1 -0
- package/dist/{canvas-C4nDXlkK.mjs → canvas-cO2NAQyX.mjs} +11 -11
- package/dist/canvas-cO2NAQyX.mjs.map +1 -0
- package/dist/context/index.cjs +18 -14
- package/dist/context/index.cjs.map +1 -1
- package/dist/context/index.d.cts +1 -1
- package/dist/context/index.d.mts +1 -1
- package/dist/context/index.mjs +18 -14
- package/dist/context/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.d.cts +1 -1
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/{index-C-TDFHpq.d.mts → index-2l9Vdh2S.d.mts} +2 -2
- package/dist/{index-C-TDFHpq.d.mts.map → index-2l9Vdh2S.d.mts.map} +1 -1
- package/dist/{index-DCOd7jg-.d.mts → index-BFqa6aqs.d.mts} +4 -4
- package/dist/{index-DCOd7jg-.d.mts.map → index-BFqa6aqs.d.mts.map} +1 -1
- package/dist/{index-_BgjSgkQ.d.mts → index-C3QIukqX.d.cts} +7 -9
- package/dist/index-C3QIukqX.d.cts.map +1 -0
- package/dist/{index-B9WbxxFC.d.mts → index-CPTq4oOA.d.cts} +5 -5
- package/dist/{index-B9WbxxFC.d.mts.map → index-CPTq4oOA.d.cts.map} +1 -1
- package/dist/{index-CNCqWBLh.d.cts → index-Ht3fVcsn.d.cts} +2 -2
- package/dist/{index-CNCqWBLh.d.cts.map → index-Ht3fVcsn.d.cts.map} +1 -1
- package/dist/{index-YNgbjS9S.d.cts → index-edb-X9uc.d.mts} +7 -9
- package/dist/index-edb-X9uc.d.mts.map +1 -0
- package/dist/{index-DGjpWDlm.d.cts → index-pInK6VDK.d.cts} +4 -4
- package/dist/{index-DGjpWDlm.d.cts.map → index-pInK6VDK.d.cts.map} +1 -1
- package/dist/{index-t3_yRTa6.d.cts → index-vf1CSWta.d.mts} +5 -5
- package/dist/{index-t3_yRTa6.d.cts.map → index-vf1CSWta.d.mts.map} +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +7 -7
- package/dist/index.d.mts +7 -7
- package/dist/index.mjs +2 -2
- package/dist/{node-props-BtAkmdqr.d.mts → node-props-Bryks8-5.d.cts} +3 -3
- package/dist/{node-props-BtAkmdqr.d.mts.map → node-props-Bryks8-5.d.cts.map} +1 -1
- package/dist/{node-props-DkuSwMA0.d.cts → node-props-Cusf_qtn.d.mts} +3 -3
- package/dist/{node-props-DkuSwMA0.d.cts.map → node-props-Cusf_qtn.d.mts.map} +1 -1
- package/dist/{node-systems-module-CPDV8u8O.d.mts → node-systems-module-B8aKhvBo.d.mts} +2 -2
- package/dist/{node-systems-module-CPDV8u8O.d.mts.map → node-systems-module-B8aKhvBo.d.mts.map} +1 -1
- package/dist/{node-systems-module-CzkoMbdF.d.cts → node-systems-module-Dx-hISbg.d.cts} +2 -2
- package/dist/{node-systems-module-CzkoMbdF.d.cts.map → node-systems-module-Dx-hISbg.d.cts.map} +1 -1
- package/dist/{node-types-D_NfbsUT.cjs → node-types-CNO_-52M.cjs} +112 -65
- package/dist/node-types-CNO_-52M.cjs.map +1 -0
- package/dist/{node-types-BRcpbaeR.mjs → node-types-l0GwV0mz.mjs} +112 -65
- package/dist/node-types-l0GwV0mz.mjs.map +1 -0
- package/dist/nodes/index.cjs +1 -1
- package/dist/nodes/index.d.cts +2 -2
- package/dist/nodes/index.d.mts +2 -2
- package/dist/nodes/index.mjs +1 -1
- package/dist/{template-tool-nodes-B7sT2iRc.d.cts → template-tool-nodes-CiwTFU-N.d.cts} +2 -2
- package/dist/{template-tool-nodes-B7sT2iRc.d.cts.map → template-tool-nodes-CiwTFU-N.d.cts.map} +1 -1
- package/dist/{template-tool-nodes-BwavFwMh.d.mts → template-tool-nodes-DWhekyQg.d.mts} +2 -2
- package/dist/{template-tool-nodes-BwavFwMh.d.mts.map → template-tool-nodes-DWhekyQg.d.mts.map} +1 -1
- package/dist/templates/index.cjs +1 -1
- package/dist/templates/index.d.cts +1 -1
- package/dist/templates/index.d.mts +1 -1
- package/dist/templates/index.mjs +1 -1
- package/package.json +3 -3
- package/dist/canvas-C4nDXlkK.mjs.map +0 -1
- package/dist/canvas-DlWcWu05.cjs.map +0 -1
- package/dist/index-YNgbjS9S.d.cts.map +0 -1
- package/dist/index-_BgjSgkQ.d.mts.map +0 -1
- package/dist/node-types-BRcpbaeR.mjs.map +0 -1
- package/dist/node-types-D_NfbsUT.cjs.map +0 -1
package/dist/canvas/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_canvas = require('../canvas-
|
|
2
|
+
const require_canvas = require('../canvas-WWAJ6C2l.cjs');
|
|
3
3
|
|
|
4
4
|
exports.FlowEcsCanvas = require_canvas.FlowEcsCanvas;
|
|
5
5
|
exports.FlowEcsState = require_canvas.flow_ecs_state_default;
|
package/dist/canvas/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as _default, n as FlowEcsCanvasProps, r as FlowEcsStateProps, t as FlowEcsCanvas } from "../index-
|
|
1
|
+
import { i as _default, n as FlowEcsCanvasProps, r as FlowEcsStateProps, t as FlowEcsCanvas } from "../index-pInK6VDK.cjs";
|
|
2
2
|
export { FlowEcsCanvas, FlowEcsCanvasProps, _default as FlowEcsState, FlowEcsStateProps };
|
package/dist/canvas/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as _default, n as FlowEcsCanvasProps, r as FlowEcsStateProps, t as FlowEcsCanvas } from "../index-
|
|
1
|
+
import { i as _default, n as FlowEcsCanvasProps, r as FlowEcsStateProps, t as FlowEcsCanvas } from "../index-BFqa6aqs.mjs";
|
|
2
2
|
export { FlowEcsCanvas, FlowEcsCanvasProps, _default as FlowEcsState, FlowEcsStateProps };
|
package/dist/canvas/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_node_types = require('./node-types-
|
|
1
|
+
const require_node_types = require('./node-types-CNO_-52M.cjs');
|
|
2
2
|
let react_compiler_runtime = require("react/compiler-runtime");
|
|
3
3
|
let _awesome_flow_core_canvas = require("@awesome-flow/core/canvas");
|
|
4
4
|
let _mantine_core = require("@mantine/core");
|
|
@@ -21,8 +21,8 @@ function FlowEcsEdgeModules(props) {
|
|
|
21
21
|
for (const node of nodesToConnect) {
|
|
22
22
|
if (!node.data.entity) continue;
|
|
23
23
|
const sourceHandle = node.data.handles.find(_temp2$2);
|
|
24
|
-
const entity = bridge.entityRepository.
|
|
25
|
-
const systemModule = bridge.ecsFlowRepository.getSystemModuleNode(entity.
|
|
24
|
+
const entity = bridge.entityRepository.getEntity(node.data.entity);
|
|
25
|
+
const systemModule = bridge.ecsFlowRepository.getSystemModuleNode(entity.identity.proxy.entityType);
|
|
26
26
|
const targetHandle = systemModule?.data.handles.find(_temp3$1);
|
|
27
27
|
if (sourceHandle && targetHandle) onConnect({
|
|
28
28
|
source: node.id,
|
|
@@ -83,8 +83,8 @@ function FlowEcsEdgeProxies(props) {
|
|
|
83
83
|
for (const node of nodesToConnect) {
|
|
84
84
|
if (!node.data.entity) continue;
|
|
85
85
|
const sourceHandle = node.data.handles.find(_temp2$1);
|
|
86
|
-
const entity = bridge.entityRepository.
|
|
87
|
-
const proxies = Array.from(bridge.entityProxyRepository.
|
|
86
|
+
const entity = bridge.entityRepository.getEntity(node.data.entity);
|
|
87
|
+
const proxies = Array.from(bridge.entityProxyRepository.getAllProxies(entity.identity.proxy).values()).flat();
|
|
88
88
|
for (const proxy of proxies) {
|
|
89
89
|
const proxyNode = bridge.ecsFlowRepository.getEntityNode(proxy);
|
|
90
90
|
if (proxyNode) {
|
|
@@ -157,11 +157,11 @@ function FlowEcsEntities() {
|
|
|
157
157
|
const nodesToAdd = [];
|
|
158
158
|
const nodesToConnect = [];
|
|
159
159
|
for (const entity of entities) {
|
|
160
|
-
let node = bridge.ecsFlowRepository.getEntityNode(entity.
|
|
160
|
+
let node = bridge.ecsFlowRepository.getEntityNode(entity.identity.proxy);
|
|
161
161
|
if (!node) {
|
|
162
162
|
node = nodeFactory.createNodeFromType("entity-node");
|
|
163
|
-
node.data.entity = entity.
|
|
164
|
-
node.data.entityType = entity.
|
|
163
|
+
node.data.entity = entity.identity.proxy;
|
|
164
|
+
node.data.entityType = entity.identity.proxy.entityType;
|
|
165
165
|
node.position = {
|
|
166
166
|
x: 0,
|
|
167
167
|
y: 0
|
|
@@ -291,7 +291,7 @@ function FlowEcsScopes() {
|
|
|
291
291
|
}
|
|
292
292
|
const childIds = [];
|
|
293
293
|
for (const entity of scope.entities) {
|
|
294
|
-
const entityNode = bridge.ecsFlowRepository.getEntityNode(entity.
|
|
294
|
+
const entityNode = bridge.ecsFlowRepository.getEntityNode(entity.identity.proxy);
|
|
295
295
|
if (!entityNode) continue;
|
|
296
296
|
childIds.push(entityNode.id);
|
|
297
297
|
}
|
|
@@ -384,7 +384,7 @@ function FlowEcsSpawnEntities() {
|
|
|
384
384
|
if (node.type !== "entity-node" || !node.data.spawn || node.data.entity) continue;
|
|
385
385
|
const update = bridge.enqueueEntitySpawn(node.data.spawn);
|
|
386
386
|
if (!update) {
|
|
387
|
-
updateNodeData(node.id, { spawnStatus: "missing-
|
|
387
|
+
updateNodeData(node.id, { spawnStatus: "missing-scheduler" });
|
|
388
388
|
continue;
|
|
389
389
|
}
|
|
390
390
|
const data = {
|
|
@@ -685,4 +685,4 @@ Object.defineProperty(exports, 'flow_ecs_state_default', {
|
|
|
685
685
|
return flow_ecs_state_default;
|
|
686
686
|
}
|
|
687
687
|
});
|
|
688
|
-
//# sourceMappingURL=canvas-
|
|
688
|
+
//# sourceMappingURL=canvas-WWAJ6C2l.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canvas-WWAJ6C2l.cjs","names":["useFlowStore","Node","useEffect","EntityNodeData","useBridgeStoreVersion","useEcsBridge","FlowEcsEdgeProxiesProps","nodesToConnect","FlowEcsEdgeModules","props","$","_c","onConnect","_temp","bridge","moduleVersion","t0","node","data","entity","sourceHandle","handles","find","_temp2","entityRepository","getEntity","systemModule","ecsFlowRepository","getSystemModuleNode","identity","proxy","entityType","targetHandle","_temp3","source","id","target","handleId","t1","t2","Symbol","for","h_0","h","connection","state","useFlowStore","Node","useEffect","EntityNodeData","useBridgeStoreVersion","useEcsBridge","FlowEcsEdgeProxiesProps","nodesToConnect","FlowEcsEdgeProxies","props","$","_c","onConnect","_temp","bridge","proxyVersion","t0","node","data","entity","sourceHandle","handles","find","_temp2","entityRepository","getEntity","proxies","Array","from","entityProxyRepository","getAllProxies","identity","proxy","values","flat","proxyNode","ecsFlowRepository","getEntityNode","targetHandle","_temp3","source","id","target","handleId","t1","t2","Symbol","for","h_0","h","connection","state","FlowContext","useFlowStore","Node","useContext","useEffect","useState","EntityNodeData","EcsNodeType","useEcsBridge","useEntityList","FlowEcsEdgeModules","FlowEcsEdgeProxies","FlowEcsEntities","$","_c","nodeFactory","addNodes","_temp","bridge","entities","t0","Symbol","for","entityNodes","setEntityNodes","t1","t2","nodesToAdd","nodesToConnect","entity","node","ecsFlowRepository","getEntityNode","identity","proxy","createNodeFromType","data","entityType","position","x","y","addEntityNode","push","length","t3","state","FlowContext","useFlowStore","Node","useContext","useEffect","SystemsModuleNodeData","EcsNodeType","useEcsBridge","useSystemsModuleList","FlowEcsModules","$","_c","nodeFactory","addNodes","_temp","bridge","modules","t0","t1","keys","Array","from","nodesToAdd","element","ecsFlowRepository","getSystemModuleNode","node","createNodeFromType","systemsModule","data","entityType","position","x","y","addSystemModuleNode","push","length","t2","Symbol","for","state","FlowContext","StoreContext","useFlowStore","Node","useContext","useEffect","shallow","EntityNodeData","ScopeGroupNodeData","EcsNodeType","useEcsBridge","useScopeList","FlowEcsScopes","$","_c","nodeFactory","flowStore","bridge","scopes","nodes","setGroups","setNodes","_temp","t0","length","changed","currentNodes","instance","getState","nextNodes","groups","scope","groupNode","ecsFlowRepository","getScopeGroupNode","scopeId","createNodeFromType","scopeGroup","data","title","position","x","y","className","addScopeGroupNode","unshift","childIds","entity","entities","entityNode","getEntityNode","identity","proxy","push","id","scopedNodeIds","Set","Object","values","flat","groupIds","keys","orderedNodes","map","node","has","type","parentId","entries","find","t1","children","includes","undefined","extent","const","sort","_temp2","t2","Symbol","for","a","b","Number","isGroup","state","useFlowStore","FlowState","Node","useEffect","shallow","EntityNodeData","EcsNodeType","useEcsBridge","selector","state","nodes","updateNodeData","FlowEcsSpawnEntities","$","_c","bridge","t0","t1","node","type","entity","data","spawn","update","enqueueEntitySpawn","id","spawnStatus","entityType","ecsFlowRepository","addEntityNode","t2","Symbol","for","FlowContext","useFlowStore","Node","useContext","useEffect","EcsToolNodeData","EcsNodeType","useEcsBridge","defaultEcsToolNodes","scheduler","eventTimeline","telemetry","updateQueue","const","EcsToolNodeType","FlowEcsToolNodesProps","nodes","FlowEcsToolNodes","t0","$","_c","t1","undefined","nodeFactory","addNodes","_temp","bridge","t2","t3","nodesToAdd","forEach","type","index","ecsFlowRepository","getToolNode","node","createNodeFromType","position","x","y","addToolNode","push","length","t4","Symbol","for","state","FlowAutoLayout","memo","useEffect","useState","useBridgeStoreVersion","useEcsBridge","FlowEcsEntities","FlowEcsModules","FlowEcsScopes","FlowEcsSpawnEntities","FlowEcsToolNodes","EcsToolNodeType","FlowEcsStateProps","showSystemModules","showEntities","autoLayout","enableEntitySpawning","showScopes","toolNodes","FlowEcsState","props","$","_c","refreshLayout","setRefreshLayout","bridge","entityVersion","moduleVersion","t0","Symbol","for","frame","requestAnimationFrame","cancelAnimationFrame","t1","ecsFlowRepository","sizeNodes","t2","t3","t4","t5","t6","Array","isArray","undefined","t7","t8","FlowCanvasContext","FlowCanvasDropWrapper","FlowCanvasRenderIntersections","FlowCanvasWrapper","FlowConnectionStatus","FlowEdgesSelection","FlowTemplatesList","Portal","useState","ecsNodeTemplates","ecsNodeTypes","FlowEcsState","FlowEcsStateProps","useEntityTypeTemplates","FlowEcsCanvasProps","Partial","enableDragDrop","showEntityTypeTemplates","showTemplates","FlowEcsCanvas","t0","$","_c","autoLayout","t1","enableEntitySpawning","t2","t3","showEntities","t4","t5","showScopes","t6","showSystemModules","t7","t8","toolNodes","t9","undefined","over","setOver","entityTypeTemplates","t10","canvas","t11","t12","t13","Symbol","for","t14","t15","t16"],"sources":["../src/flow/flow-ecs-edge-modules.tsx","../src/flow/flow-ecs-edge-proxies.tsx","../src/flow/flow-ecs-entities.tsx","../src/flow/flow-ecs-modules.tsx","../src/flow/flow-ecs-scopes.tsx","../src/flow/flow-ecs-spawn-entities.tsx","../src/flow/flow-ecs-tool-nodes.tsx","../src/flow/flow-ecs-state.tsx","../src/canvas/flow-ecs-canvas.tsx"],"sourcesContent":["import { useFlowStore } from '@awesome-flow/core/hooks';\nimport { Node } from '@xyflow/react';\nimport { useEffect } from 'react';\nimport { EntityNodeData } from '../abstract/node-props';\nimport { useBridgeStoreVersion, useEcsBridge } from '../hooks';\n\nexport type FlowEcsEdgeProxiesProps = {\n nodesToConnect: Node<EntityNodeData>[];\n};\n\nfunction FlowEcsEdgeModules(props: Readonly<FlowEcsEdgeProxiesProps>) {\n const { nodesToConnect } = props;\n\n const onConnect = useFlowStore((state: { onConnect: any }) => state.onConnect);\n\n const bridge = useEcsBridge();\n const moduleVersion = useBridgeStoreVersion('modules');\n\n useEffect(() => {\n for (const node of nodesToConnect) {\n if (!node.data.entity) {\n continue;\n }\n\n const sourceHandle = node.data.handles.find((h) => h.connection === 'source');\n const entity = bridge.entityRepository.getEntity(node.data.entity);\n\n const systemModule = bridge.ecsFlowRepository.getSystemModuleNode(entity.identity.proxy.entityType);\n const targetHandle = systemModule?.data.handles.find((h) => h.connection === 'target');\n\n if (sourceHandle && targetHandle) {\n onConnect({\n source: node.id,\n target: systemModule.id,\n sourceHandle: sourceHandle.handleId,\n targetHandle: targetHandle.handleId\n });\n }\n }\n }, [bridge, moduleVersion, nodesToConnect, onConnect]);\n\n return <></>;\n}\n\nexport default FlowEcsEdgeModules;\n","import { useFlowStore } from '@awesome-flow/core/hooks';\nimport { Node } from '@xyflow/react';\nimport { useEffect } from 'react';\nimport { EntityNodeData } from '../abstract/node-props';\nimport { useBridgeStoreVersion, useEcsBridge } from '../hooks';\n\nexport type FlowEcsEdgeProxiesProps = {\n nodesToConnect: Node<EntityNodeData>[];\n};\n\nfunction FlowEcsEdgeProxies(props: Readonly<FlowEcsEdgeProxiesProps>) {\n const { nodesToConnect } = props;\n\n const onConnect = useFlowStore((state: { onConnect: any }) => state.onConnect);\n\n const bridge = useEcsBridge();\n const proxyVersion = useBridgeStoreVersion('proxies');\n\n useEffect(() => {\n for (const node of nodesToConnect) {\n if (!node.data.entity) {\n continue;\n }\n\n const sourceHandle = node.data.handles.find((h) => h.connection === 'source');\n const entity = bridge.entityRepository.getEntity(node.data.entity);\n const proxies = Array.from(bridge.entityProxyRepository.getAllProxies(entity.identity.proxy).values()).flat();\n\n for (const proxy of proxies) {\n const proxyNode = bridge.ecsFlowRepository.getEntityNode(proxy);\n\n if (proxyNode) {\n const targetHandle = proxyNode.data.handles.find((h) => h.connection === 'target');\n\n if (sourceHandle && targetHandle) {\n onConnect({\n source: node.id,\n target: proxyNode.id,\n sourceHandle: sourceHandle.handleId,\n targetHandle: targetHandle.handleId\n });\n }\n }\n }\n }\n }, [bridge, nodesToConnect, onConnect, proxyVersion]);\n\n return <></>;\n}\n\nexport default FlowEcsEdgeProxies;\n","import { FlowContext } from '@awesome-flow/core/abstract';\nimport { useFlowStore } from '@awesome-flow/core/hooks';\nimport { Node } from '@xyflow/react';\nimport { useContext, useEffect, useState } from 'react';\nimport { EntityNodeData } from '../abstract/node-props';\nimport { EcsNodeType } from '../abstract/node-types';\nimport { useEcsBridge, useEntityList } from '../hooks';\nimport FlowEcsEdgeModules from './flow-ecs-edge-modules';\nimport FlowEcsEdgeProxies from './flow-ecs-edge-proxies';\n\nfunction FlowEcsEntities() {\n const { nodeFactory } = useContext(FlowContext);\n const addNodes = useFlowStore((state) => state.addNodes);\n\n const bridge = useEcsBridge();\n const entities = useEntityList();\n const [entityNodes, setEntityNodes] = useState<Node<EntityNodeData>[]>([]);\n\n useEffect(() => {\n const nodesToAdd: Node<EntityNodeData>[] = [];\n const nodesToConnect: Node<EntityNodeData>[] = [];\n\n for (const entity of entities) {\n let node = bridge.ecsFlowRepository.getEntityNode(entity.identity.proxy);\n\n if (!node) {\n node = nodeFactory.createNodeFromType<EntityNodeData>(EcsNodeType.entity);\n node.data.entity = entity.identity.proxy;\n node.data.entityType = entity.identity.proxy.entityType;\n node.position = { x: 0, y: 0 };\n\n bridge.ecsFlowRepository.addEntityNode(node);\n nodesToAdd.push(node);\n }\n\n nodesToConnect.push(node);\n }\n\n setEntityNodes(nodesToConnect);\n if (nodesToAdd.length) {\n addNodes(nodesToAdd);\n }\n }, [addNodes, bridge, entities, nodeFactory]);\n\n return (\n <>\n <FlowEcsEdgeProxies nodesToConnect={entityNodes} />\n <FlowEcsEdgeModules nodesToConnect={entityNodes} />\n </>\n );\n}\n\nexport default FlowEcsEntities;\n","import { FlowContext } from '@awesome-flow/core/abstract';\nimport { useFlowStore } from '@awesome-flow/core/hooks';\nimport { Node } from '@xyflow/react';\nimport { useContext, useEffect } from 'react';\nimport { SystemsModuleNodeData } from '../abstract/node-props';\nimport { EcsNodeType } from '../abstract/node-types';\nimport { useEcsBridge, useSystemsModuleList } from '../hooks';\n\nfunction FlowEcsModules() {\n const { nodeFactory } = useContext(FlowContext);\n const addNodes = useFlowStore((state) => state.addNodes);\n\n const bridge = useEcsBridge();\n const modules = useSystemsModuleList();\n\n useEffect(() => {\n const keys = Array.from(modules.keys());\n\n const nodesToAdd: Node<SystemsModuleNodeData>[] = [];\n\n for (const element of keys) {\n if (bridge.ecsFlowRepository.getSystemModuleNode(element)) {\n continue;\n }\n\n const node = nodeFactory.createNodeFromType<SystemsModuleNodeData>(EcsNodeType.systemsModule);\n\n node.data.entityType = element;\n node.position = { x: 0, y: 0 };\n\n bridge.ecsFlowRepository.addSystemModuleNode(node);\n nodesToAdd.push(node);\n }\n\n if (nodesToAdd.length) {\n addNodes(nodesToAdd);\n }\n }, [addNodes, bridge, modules, nodeFactory]);\n\n return <></>;\n}\n\nexport default FlowEcsModules;\n","import { FlowContext, StoreContext } from '@awesome-flow/core/abstract';\nimport { useFlowStore } from '@awesome-flow/core/hooks';\nimport { Node } from '@xyflow/react';\nimport { useContext, useEffect } from 'react';\nimport { shallow } from 'zustand/shallow';\nimport { EntityNodeData, ScopeGroupNodeData } from '../abstract/node-props';\nimport { EcsNodeType } from '../abstract/node-types';\nimport { useEcsBridge, useScopeList } from '../hooks';\n\nfunction FlowEcsScopes() {\n const { nodeFactory } = useContext(FlowContext);\n const { flowStore } = useContext(StoreContext);\n const bridge = useEcsBridge();\n const scopes = useScopeList();\n\n const { nodes, setGroups, setNodes } = useFlowStore(\n (state) => ({\n nodes: state.nodes,\n setGroups: state.setGroups,\n setNodes: state.setNodes\n }),\n shallow\n );\n\n useEffect(() => {\n if (!scopes.length) {\n return;\n }\n\n let changed = false;\n const currentNodes = flowStore.instance.getState().nodes;\n const nextNodes = [...currentNodes];\n const groups: Record<string, string[]> = {};\n\n for (const scope of scopes) {\n let groupNode = bridge.ecsFlowRepository.getScopeGroupNode(scope.scopeId);\n\n if (!groupNode) {\n groupNode = nodeFactory.createNodeFromType<ScopeGroupNodeData>(EcsNodeType.scopeGroup);\n groupNode.data.scopeId = scope.scopeId;\n groupNode.data.title = 'Scope';\n groupNode.position = { x: 0, y: 0 };\n groupNode.className = 'react-flow__node-group';\n\n bridge.ecsFlowRepository.addScopeGroupNode(groupNode);\n nextNodes.unshift(groupNode);\n changed = true;\n }\n\n const childIds: string[] = [];\n for (const entity of scope.entities) {\n const entityNode = bridge.ecsFlowRepository.getEntityNode(entity.identity.proxy) as Node<EntityNodeData> | undefined;\n if (!entityNode) {\n continue;\n }\n\n childIds.push(entityNode.id);\n }\n\n groups[groupNode.id] = childIds;\n }\n\n const scopedNodeIds = new Set(Object.values(groups).flat());\n const groupIds = new Set(Object.keys(groups));\n const orderedNodes = nextNodes\n .map((node) => {\n if (groupIds.has(node.id)) {\n return node;\n }\n\n if (node.type !== EcsNodeType.entity) {\n return node;\n }\n\n const parentId = scopedNodeIds.has(node.id)\n ? Object.entries(groups).find(([, children]) => children.includes(node.id))?.[0]\n : undefined;\n\n if (node.parentId !== parentId) {\n changed = true;\n return {\n ...node,\n extent: parentId ? ('parent' as const) : undefined,\n parentId\n };\n }\n\n return node;\n })\n .sort((a, b) => Number(!a.data?.isGroup) - Number(!b.data?.isGroup));\n\n if (changed) {\n setNodes(orderedNodes);\n }\n\n setGroups(groups);\n }, [bridge, flowStore, nodeFactory, nodes, scopes, setGroups, setNodes]);\n\n return <></>;\n}\n\nexport default FlowEcsScopes;\n","import { useFlowStore } from '@awesome-flow/core/hooks';\nimport { FlowState } from '@awesome-flow/core/stores';\nimport { Node } from '@xyflow/react';\nimport { useEffect } from 'react';\nimport { shallow } from 'zustand/shallow';\nimport { EntityNodeData } from '../abstract/node-props';\nimport { EcsNodeType } from '../abstract/node-types';\nimport { useEcsBridge } from '../hooks';\n\nconst selector = (state: FlowState) => ({\n nodes: state.nodes,\n updateNodeData: state.updateNodeData\n});\n\nfunction FlowEcsSpawnEntities() {\n const bridge = useEcsBridge();\n const { nodes, updateNodeData } = useFlowStore(selector, shallow);\n\n useEffect(() => {\n for (const node of nodes as Node<EntityNodeData>[]) {\n if (node.type !== EcsNodeType.entity || !node.data.spawn || node.data.entity) {\n continue;\n }\n\n const update = bridge.enqueueEntitySpawn(node.data.spawn);\n if (!update) {\n updateNodeData<EntityNodeData>(node.id, {\n spawnStatus: 'missing-scheduler'\n });\n continue;\n }\n\n const data: Partial<EntityNodeData> = {\n entity: update.entity,\n entityType: update.entity.entityType,\n spawnStatus: 'queued'\n };\n\n bridge.ecsFlowRepository.addEntityNode({\n ...node,\n data: {\n ...node.data,\n ...data\n }\n });\n updateNodeData<EntityNodeData>(node.id, data);\n }\n }, [bridge, nodes, updateNodeData]);\n\n return <></>;\n}\n\nexport default FlowEcsSpawnEntities;\n","import { FlowContext } from '@awesome-flow/core/abstract';\nimport { useFlowStore } from '@awesome-flow/core/hooks';\nimport { Node } from '@xyflow/react';\nimport { useContext, useEffect } from 'react';\nimport { EcsToolNodeData } from '../abstract/node-props';\nimport { EcsNodeType } from '../abstract/node-types';\nimport { useEcsBridge } from '../hooks';\n\nexport const defaultEcsToolNodes = [\n EcsNodeType.scheduler,\n EcsNodeType.eventTimeline,\n EcsNodeType.telemetry,\n EcsNodeType.updateQueue\n] as const;\n\nexport type EcsToolNodeType = (typeof defaultEcsToolNodes)[number];\n\nexport type FlowEcsToolNodesProps = {\n nodes?: readonly EcsToolNodeType[];\n};\n\nfunction FlowEcsToolNodes({ nodes = defaultEcsToolNodes }: Readonly<FlowEcsToolNodesProps>) {\n const { nodeFactory } = useContext(FlowContext);\n const addNodes = useFlowStore((state) => state.addNodes);\n const bridge = useEcsBridge();\n\n useEffect(() => {\n const nodesToAdd: Node<EcsToolNodeData>[] = [];\n\n nodes.forEach((type, index) => {\n if (bridge.ecsFlowRepository.getToolNode(type)) {\n return;\n }\n\n const node = nodeFactory.createNodeFromType<EcsToolNodeData>(type);\n node.position = { x: 980, y: index * 220 };\n bridge.ecsFlowRepository.addToolNode(node);\n nodesToAdd.push(node);\n });\n\n if (nodesToAdd.length) {\n addNodes(nodesToAdd);\n }\n }, [addNodes, bridge, nodeFactory, nodes]);\n\n return <></>;\n}\n\nexport default FlowEcsToolNodes;\n","import { FlowAutoLayout } from '@awesome-flow/core/canvas';\nimport { memo, useEffect, useState } from 'react';\nimport { useBridgeStoreVersion, useEcsBridge } from '../hooks';\nimport FlowEcsEntities from './flow-ecs-entities';\nimport FlowEcsModules from './flow-ecs-modules';\nimport FlowEcsScopes from './flow-ecs-scopes';\nimport FlowEcsSpawnEntities from './flow-ecs-spawn-entities';\nimport FlowEcsToolNodes, { EcsToolNodeType } from './flow-ecs-tool-nodes';\n\nexport type FlowEcsStateProps = {\n showSystemModules: boolean;\n showEntities: boolean;\n autoLayout: boolean;\n enableEntitySpawning?: boolean;\n showScopes?: boolean;\n toolNodes?: boolean | readonly EcsToolNodeType[];\n};\n\nfunction FlowEcsState(props: Readonly<FlowEcsStateProps>) {\n const [refreshLayout, setRefreshLayout] = useState(false);\n const bridge = useEcsBridge();\n const entityVersion = useBridgeStoreVersion('entities');\n const moduleVersion = useBridgeStoreVersion('modules');\n\n useEffect(() => {\n setRefreshLayout(false);\n const frame = requestAnimationFrame(() => setRefreshLayout(true));\n\n return () => cancelAnimationFrame(frame);\n }, [bridge.ecsFlowRepository.sizeNodes, entityVersion, moduleVersion]);\n\n return (\n <>\n {props.showSystemModules && <FlowEcsModules />}\n {props.showEntities && <FlowEcsEntities />}\n {props.enableEntitySpawning && <FlowEcsSpawnEntities />}\n {props.showScopes && <FlowEcsScopes />}\n {props.toolNodes && <FlowEcsToolNodes nodes={Array.isArray(props.toolNodes) ? props.toolNodes : undefined} />}\n {props.autoLayout && <FlowAutoLayout refreshLayout={refreshLayout} />}\n </>\n );\n}\n\nexport default memo(FlowEcsState);\n","import {\n FlowCanvasContext,\n FlowCanvasDropWrapper,\n FlowCanvasRenderIntersections,\n FlowCanvasWrapper,\n FlowConnectionStatus,\n FlowEdgesSelection,\n FlowTemplatesList\n} from '@awesome-flow/core/canvas';\nimport { Portal } from '@mantine/core';\nimport { useState } from 'react';\nimport { ecsNodeTemplates, ecsNodeTypes } from '../abstract/node-types';\nimport FlowEcsState, { FlowEcsStateProps } from '../flow/flow-ecs-state';\nimport { useEntityTypeTemplates } from '../hooks';\n\nexport type FlowEcsCanvasProps = Partial<FlowEcsStateProps> & {\n enableDragDrop?: boolean;\n showEntityTypeTemplates?: boolean;\n showTemplates?: boolean;\n};\n\nexport function FlowEcsCanvas({\n autoLayout = true,\n enableEntitySpawning = true,\n enableDragDrop = true,\n showEntities = true,\n showEntityTypeTemplates = true,\n showScopes = true,\n showSystemModules = true,\n showTemplates = false,\n toolNodes = false\n}: Readonly<FlowEcsCanvasProps>) {\n const [over, setOver] = useState(false);\n const entityTypeTemplates = useEntityTypeTemplates(showEntityTypeTemplates);\n const canvas = <FlowCanvasRenderIntersections canvasHighlighted={over} nodeTypes={ecsNodeTypes} />;\n\n return (\n <FlowCanvasContext nodeTemplates={ecsNodeTemplates}>\n {enableDragDrop ? (\n <FlowCanvasDropWrapper setOver={setOver}>{canvas}</FlowCanvasDropWrapper>\n ) : (\n <FlowCanvasWrapper>{canvas}</FlowCanvasWrapper>\n )}\n <FlowEdgesSelection />\n <FlowConnectionStatus />\n <FlowEcsState\n autoLayout={autoLayout}\n enableEntitySpawning={enableEntitySpawning}\n showEntities={showEntities}\n showScopes={showScopes}\n showSystemModules={showSystemModules}\n toolNodes={toolNodes}\n />\n {showTemplates && (\n <Portal target=\"#portal-navbar\">\n <FlowTemplatesList extraTemplates={entityTypeTemplates} nodeTypes={ecsNodeTypes} />\n </Portal>\n )}\n </FlowCanvasContext>\n );\n}\n"],"mappings":";;;;;;;;;;;AAUA,SAAAQ,mBAAAC,OAAA;CAAA,MAAAC,kCAAA,EAAA;CACE,MAAA,EAAAH,mBAA2BE;CAE3B,MAAAG,uDAA+BC,OAA8C;CAE7E,MAAAC,SAAeT,gCAAa;CAC5B,MAAAU,gBAAsBX,yCAAsB,SAAS;CAAE,IAAAY;CAAA,IAAAN,EAAA,OAAAI,UAAAJ,EAAA,OAAAH,kBAAAG,EAAA,OAAAE,WAAA;EAE7CI,WAAA;GACR,KAAK,MAAAC,QAAcV,gBAAc;IAC/B,IA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-1,4 +1,4 @@
|
|
|
1
|
-
import { E as useEntityTypeTemplates, F as useBridgeStoreVersion, I as useEcsBridge, M as useEntityList, b as useScopeList, n as ecsNodeTemplates, r as ecsNodeTypes, t as EcsNodeType, y as useSystemsModuleList } from "./node-types-
|
|
1
|
+
import { E as useEntityTypeTemplates, F as useBridgeStoreVersion, I as useEcsBridge, M as useEntityList, b as useScopeList, n as ecsNodeTemplates, r as ecsNodeTypes, t as EcsNodeType, y as useSystemsModuleList } from "./node-types-l0GwV0mz.mjs";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { FlowAutoLayout, FlowCanvasContext, FlowCanvasDropWrapper, FlowCanvasRenderIntersections, FlowCanvasWrapper, FlowConnectionStatus, FlowEdgesSelection, FlowTemplatesList } from "@awesome-flow/core/canvas";
|
|
4
4
|
import { Portal } from "@mantine/core";
|
|
@@ -21,8 +21,8 @@ function FlowEcsEdgeModules(props) {
|
|
|
21
21
|
for (const node of nodesToConnect) {
|
|
22
22
|
if (!node.data.entity) continue;
|
|
23
23
|
const sourceHandle = node.data.handles.find(_temp2$2);
|
|
24
|
-
const entity = bridge.entityRepository.
|
|
25
|
-
const systemModule = bridge.ecsFlowRepository.getSystemModuleNode(entity.
|
|
24
|
+
const entity = bridge.entityRepository.getEntity(node.data.entity);
|
|
25
|
+
const systemModule = bridge.ecsFlowRepository.getSystemModuleNode(entity.identity.proxy.entityType);
|
|
26
26
|
const targetHandle = systemModule?.data.handles.find(_temp3$1);
|
|
27
27
|
if (sourceHandle && targetHandle) onConnect({
|
|
28
28
|
source: node.id,
|
|
@@ -83,8 +83,8 @@ function FlowEcsEdgeProxies(props) {
|
|
|
83
83
|
for (const node of nodesToConnect) {
|
|
84
84
|
if (!node.data.entity) continue;
|
|
85
85
|
const sourceHandle = node.data.handles.find(_temp2$1);
|
|
86
|
-
const entity = bridge.entityRepository.
|
|
87
|
-
const proxies = Array.from(bridge.entityProxyRepository.
|
|
86
|
+
const entity = bridge.entityRepository.getEntity(node.data.entity);
|
|
87
|
+
const proxies = Array.from(bridge.entityProxyRepository.getAllProxies(entity.identity.proxy).values()).flat();
|
|
88
88
|
for (const proxy of proxies) {
|
|
89
89
|
const proxyNode = bridge.ecsFlowRepository.getEntityNode(proxy);
|
|
90
90
|
if (proxyNode) {
|
|
@@ -157,11 +157,11 @@ function FlowEcsEntities() {
|
|
|
157
157
|
const nodesToAdd = [];
|
|
158
158
|
const nodesToConnect = [];
|
|
159
159
|
for (const entity of entities) {
|
|
160
|
-
let node = bridge.ecsFlowRepository.getEntityNode(entity.
|
|
160
|
+
let node = bridge.ecsFlowRepository.getEntityNode(entity.identity.proxy);
|
|
161
161
|
if (!node) {
|
|
162
162
|
node = nodeFactory.createNodeFromType("entity-node");
|
|
163
|
-
node.data.entity = entity.
|
|
164
|
-
node.data.entityType = entity.
|
|
163
|
+
node.data.entity = entity.identity.proxy;
|
|
164
|
+
node.data.entityType = entity.identity.proxy.entityType;
|
|
165
165
|
node.position = {
|
|
166
166
|
x: 0,
|
|
167
167
|
y: 0
|
|
@@ -291,7 +291,7 @@ function FlowEcsScopes() {
|
|
|
291
291
|
}
|
|
292
292
|
const childIds = [];
|
|
293
293
|
for (const entity of scope.entities) {
|
|
294
|
-
const entityNode = bridge.ecsFlowRepository.getEntityNode(entity.
|
|
294
|
+
const entityNode = bridge.ecsFlowRepository.getEntityNode(entity.identity.proxy);
|
|
295
295
|
if (!entityNode) continue;
|
|
296
296
|
childIds.push(entityNode.id);
|
|
297
297
|
}
|
|
@@ -384,7 +384,7 @@ function FlowEcsSpawnEntities() {
|
|
|
384
384
|
if (node.type !== "entity-node" || !node.data.spawn || node.data.entity) continue;
|
|
385
385
|
const update = bridge.enqueueEntitySpawn(node.data.spawn);
|
|
386
386
|
if (!update) {
|
|
387
|
-
updateNodeData(node.id, { spawnStatus: "missing-
|
|
387
|
+
updateNodeData(node.id, { spawnStatus: "missing-scheduler" });
|
|
388
388
|
continue;
|
|
389
389
|
}
|
|
390
390
|
const data = {
|
|
@@ -674,4 +674,4 @@ function FlowEcsCanvas(t0) {
|
|
|
674
674
|
|
|
675
675
|
//#endregion
|
|
676
676
|
export { flow_ecs_state_default as n, FlowEcsCanvas as t };
|
|
677
|
-
//# sourceMappingURL=canvas-
|
|
677
|
+
//# sourceMappingURL=canvas-cO2NAQyX.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canvas-cO2NAQyX.mjs","names":["useFlowStore","Node","useEffect","EntityNodeData","useBridgeStoreVersion","useEcsBridge","FlowEcsEdgeProxiesProps","nodesToConnect","FlowEcsEdgeModules","props","$","_c","onConnect","_temp","bridge","moduleVersion","t0","node","data","entity","sourceHandle","handles","find","_temp2","entityRepository","getEntity","systemModule","ecsFlowRepository","getSystemModuleNode","identity","proxy","entityType","targetHandle","_temp3","source","id","target","handleId","t1","t2","Symbol","for","h_0","h","connection","state","useFlowStore","Node","useEffect","EntityNodeData","useBridgeStoreVersion","useEcsBridge","FlowEcsEdgeProxiesProps","nodesToConnect","FlowEcsEdgeProxies","props","$","_c","onConnect","_temp","bridge","proxyVersion","t0","node","data","entity","sourceHandle","handles","find","_temp2","entityRepository","getEntity","proxies","Array","from","entityProxyRepository","getAllProxies","identity","proxy","values","flat","proxyNode","ecsFlowRepository","getEntityNode","targetHandle","_temp3","source","id","target","handleId","t1","t2","Symbol","for","h_0","h","connection","state","FlowContext","useFlowStore","Node","useContext","useEffect","useState","EntityNodeData","EcsNodeType","useEcsBridge","useEntityList","FlowEcsEdgeModules","FlowEcsEdgeProxies","FlowEcsEntities","$","_c","nodeFactory","addNodes","_temp","bridge","entities","t0","Symbol","for","entityNodes","setEntityNodes","t1","t2","nodesToAdd","nodesToConnect","entity","node","ecsFlowRepository","getEntityNode","identity","proxy","createNodeFromType","data","entityType","position","x","y","addEntityNode","push","length","t3","state","FlowContext","useFlowStore","Node","useContext","useEffect","SystemsModuleNodeData","EcsNodeType","useEcsBridge","useSystemsModuleList","FlowEcsModules","$","_c","nodeFactory","addNodes","_temp","bridge","modules","t0","t1","keys","Array","from","nodesToAdd","element","ecsFlowRepository","getSystemModuleNode","node","createNodeFromType","systemsModule","data","entityType","position","x","y","addSystemModuleNode","push","length","t2","Symbol","for","state","FlowContext","StoreContext","useFlowStore","Node","useContext","useEffect","shallow","EntityNodeData","ScopeGroupNodeData","EcsNodeType","useEcsBridge","useScopeList","FlowEcsScopes","$","_c","nodeFactory","flowStore","bridge","scopes","nodes","setGroups","setNodes","_temp","t0","length","changed","currentNodes","instance","getState","nextNodes","groups","scope","groupNode","ecsFlowRepository","getScopeGroupNode","scopeId","createNodeFromType","scopeGroup","data","title","position","x","y","className","addScopeGroupNode","unshift","childIds","entity","entities","entityNode","getEntityNode","identity","proxy","push","id","scopedNodeIds","Set","Object","values","flat","groupIds","keys","orderedNodes","map","node","has","type","parentId","entries","find","t1","children","includes","undefined","extent","const","sort","_temp2","t2","Symbol","for","a","b","Number","isGroup","state","useFlowStore","FlowState","Node","useEffect","shallow","EntityNodeData","EcsNodeType","useEcsBridge","selector","state","nodes","updateNodeData","FlowEcsSpawnEntities","$","_c","bridge","t0","t1","node","type","entity","data","spawn","update","enqueueEntitySpawn","id","spawnStatus","entityType","ecsFlowRepository","addEntityNode","t2","Symbol","for","FlowContext","useFlowStore","Node","useContext","useEffect","EcsToolNodeData","EcsNodeType","useEcsBridge","defaultEcsToolNodes","scheduler","eventTimeline","telemetry","updateQueue","const","EcsToolNodeType","FlowEcsToolNodesProps","nodes","FlowEcsToolNodes","t0","$","_c","t1","undefined","nodeFactory","addNodes","_temp","bridge","t2","t3","nodesToAdd","forEach","type","index","ecsFlowRepository","getToolNode","node","createNodeFromType","position","x","y","addToolNode","push","length","t4","Symbol","for","state","FlowAutoLayout","memo","useEffect","useState","useBridgeStoreVersion","useEcsBridge","FlowEcsEntities","FlowEcsModules","FlowEcsScopes","FlowEcsSpawnEntities","FlowEcsToolNodes","EcsToolNodeType","FlowEcsStateProps","showSystemModules","showEntities","autoLayout","enableEntitySpawning","showScopes","toolNodes","FlowEcsState","props","$","_c","refreshLayout","setRefreshLayout","bridge","entityVersion","moduleVersion","t0","Symbol","for","frame","requestAnimationFrame","cancelAnimationFrame","t1","ecsFlowRepository","sizeNodes","t2","t3","t4","t5","t6","Array","isArray","undefined","t7","t8","FlowCanvasContext","FlowCanvasDropWrapper","FlowCanvasRenderIntersections","FlowCanvasWrapper","FlowConnectionStatus","FlowEdgesSelection","FlowTemplatesList","Portal","useState","ecsNodeTemplates","ecsNodeTypes","FlowEcsState","FlowEcsStateProps","useEntityTypeTemplates","FlowEcsCanvasProps","Partial","enableDragDrop","showEntityTypeTemplates","showTemplates","FlowEcsCanvas","t0","$","_c","autoLayout","t1","enableEntitySpawning","t2","t3","showEntities","t4","t5","showScopes","t6","showSystemModules","t7","t8","toolNodes","t9","undefined","over","setOver","entityTypeTemplates","t10","canvas","t11","t12","t13","Symbol","for","t14","t15","t16"],"sources":["../src/flow/flow-ecs-edge-modules.tsx","../src/flow/flow-ecs-edge-proxies.tsx","../src/flow/flow-ecs-entities.tsx","../src/flow/flow-ecs-modules.tsx","../src/flow/flow-ecs-scopes.tsx","../src/flow/flow-ecs-spawn-entities.tsx","../src/flow/flow-ecs-tool-nodes.tsx","../src/flow/flow-ecs-state.tsx","../src/canvas/flow-ecs-canvas.tsx"],"sourcesContent":["import { useFlowStore } from '@awesome-flow/core/hooks';\nimport { Node } from '@xyflow/react';\nimport { useEffect } from 'react';\nimport { EntityNodeData } from '../abstract/node-props';\nimport { useBridgeStoreVersion, useEcsBridge } from '../hooks';\n\nexport type FlowEcsEdgeProxiesProps = {\n nodesToConnect: Node<EntityNodeData>[];\n};\n\nfunction FlowEcsEdgeModules(props: Readonly<FlowEcsEdgeProxiesProps>) {\n const { nodesToConnect } = props;\n\n const onConnect = useFlowStore((state: { onConnect: any }) => state.onConnect);\n\n const bridge = useEcsBridge();\n const moduleVersion = useBridgeStoreVersion('modules');\n\n useEffect(() => {\n for (const node of nodesToConnect) {\n if (!node.data.entity) {\n continue;\n }\n\n const sourceHandle = node.data.handles.find((h) => h.connection === 'source');\n const entity = bridge.entityRepository.getEntity(node.data.entity);\n\n const systemModule = bridge.ecsFlowRepository.getSystemModuleNode(entity.identity.proxy.entityType);\n const targetHandle = systemModule?.data.handles.find((h) => h.connection === 'target');\n\n if (sourceHandle && targetHandle) {\n onConnect({\n source: node.id,\n target: systemModule.id,\n sourceHandle: sourceHandle.handleId,\n targetHandle: targetHandle.handleId\n });\n }\n }\n }, [bridge, moduleVersion, nodesToConnect, onConnect]);\n\n return <></>;\n}\n\nexport default FlowEcsEdgeModules;\n","import { useFlowStore } from '@awesome-flow/core/hooks';\nimport { Node } from '@xyflow/react';\nimport { useEffect } from 'react';\nimport { EntityNodeData } from '../abstract/node-props';\nimport { useBridgeStoreVersion, useEcsBridge } from '../hooks';\n\nexport type FlowEcsEdgeProxiesProps = {\n nodesToConnect: Node<EntityNodeData>[];\n};\n\nfunction FlowEcsEdgeProxies(props: Readonly<FlowEcsEdgeProxiesProps>) {\n const { nodesToConnect } = props;\n\n const onConnect = useFlowStore((state: { onConnect: any }) => state.onConnect);\n\n const bridge = useEcsBridge();\n const proxyVersion = useBridgeStoreVersion('proxies');\n\n useEffect(() => {\n for (const node of nodesToConnect) {\n if (!node.data.entity) {\n continue;\n }\n\n const sourceHandle = node.data.handles.find((h) => h.connection === 'source');\n const entity = bridge.entityRepository.getEntity(node.data.entity);\n const proxies = Array.from(bridge.entityProxyRepository.getAllProxies(entity.identity.proxy).values()).flat();\n\n for (const proxy of proxies) {\n const proxyNode = bridge.ecsFlowRepository.getEntityNode(proxy);\n\n if (proxyNode) {\n const targetHandle = proxyNode.data.handles.find((h) => h.connection === 'target');\n\n if (sourceHandle && targetHandle) {\n onConnect({\n source: node.id,\n target: proxyNode.id,\n sourceHandle: sourceHandle.handleId,\n targetHandle: targetHandle.handleId\n });\n }\n }\n }\n }\n }, [bridge, nodesToConnect, onConnect, proxyVersion]);\n\n return <></>;\n}\n\nexport default FlowEcsEdgeProxies;\n","import { FlowContext } from '@awesome-flow/core/abstract';\nimport { useFlowStore } from '@awesome-flow/core/hooks';\nimport { Node } from '@xyflow/react';\nimport { useContext, useEffect, useState } from 'react';\nimport { EntityNodeData } from '../abstract/node-props';\nimport { EcsNodeType } from '../abstract/node-types';\nimport { useEcsBridge, useEntityList } from '../hooks';\nimport FlowEcsEdgeModules from './flow-ecs-edge-modules';\nimport FlowEcsEdgeProxies from './flow-ecs-edge-proxies';\n\nfunction FlowEcsEntities() {\n const { nodeFactory } = useContext(FlowContext);\n const addNodes = useFlowStore((state) => state.addNodes);\n\n const bridge = useEcsBridge();\n const entities = useEntityList();\n const [entityNodes, setEntityNodes] = useState<Node<EntityNodeData>[]>([]);\n\n useEffect(() => {\n const nodesToAdd: Node<EntityNodeData>[] = [];\n const nodesToConnect: Node<EntityNodeData>[] = [];\n\n for (const entity of entities) {\n let node = bridge.ecsFlowRepository.getEntityNode(entity.identity.proxy);\n\n if (!node) {\n node = nodeFactory.createNodeFromType<EntityNodeData>(EcsNodeType.entity);\n node.data.entity = entity.identity.proxy;\n node.data.entityType = entity.identity.proxy.entityType;\n node.position = { x: 0, y: 0 };\n\n bridge.ecsFlowRepository.addEntityNode(node);\n nodesToAdd.push(node);\n }\n\n nodesToConnect.push(node);\n }\n\n setEntityNodes(nodesToConnect);\n if (nodesToAdd.length) {\n addNodes(nodesToAdd);\n }\n }, [addNodes, bridge, entities, nodeFactory]);\n\n return (\n <>\n <FlowEcsEdgeProxies nodesToConnect={entityNodes} />\n <FlowEcsEdgeModules nodesToConnect={entityNodes} />\n </>\n );\n}\n\nexport default FlowEcsEntities;\n","import { FlowContext } from '@awesome-flow/core/abstract';\nimport { useFlowStore } from '@awesome-flow/core/hooks';\nimport { Node } from '@xyflow/react';\nimport { useContext, useEffect } from 'react';\nimport { SystemsModuleNodeData } from '../abstract/node-props';\nimport { EcsNodeType } from '../abstract/node-types';\nimport { useEcsBridge, useSystemsModuleList } from '../hooks';\n\nfunction FlowEcsModules() {\n const { nodeFactory } = useContext(FlowContext);\n const addNodes = useFlowStore((state) => state.addNodes);\n\n const bridge = useEcsBridge();\n const modules = useSystemsModuleList();\n\n useEffect(() => {\n const keys = Array.from(modules.keys());\n\n const nodesToAdd: Node<SystemsModuleNodeData>[] = [];\n\n for (const element of keys) {\n if (bridge.ecsFlowRepository.getSystemModuleNode(element)) {\n continue;\n }\n\n const node = nodeFactory.createNodeFromType<SystemsModuleNodeData>(EcsNodeType.systemsModule);\n\n node.data.entityType = element;\n node.position = { x: 0, y: 0 };\n\n bridge.ecsFlowRepository.addSystemModuleNode(node);\n nodesToAdd.push(node);\n }\n\n if (nodesToAdd.length) {\n addNodes(nodesToAdd);\n }\n }, [addNodes, bridge, modules, nodeFactory]);\n\n return <></>;\n}\n\nexport default FlowEcsModules;\n","import { FlowContext, StoreContext } from '@awesome-flow/core/abstract';\nimport { useFlowStore } from '@awesome-flow/core/hooks';\nimport { Node } from '@xyflow/react';\nimport { useContext, useEffect } from 'react';\nimport { shallow } from 'zustand/shallow';\nimport { EntityNodeData, ScopeGroupNodeData } from '../abstract/node-props';\nimport { EcsNodeType } from '../abstract/node-types';\nimport { useEcsBridge, useScopeList } from '../hooks';\n\nfunction FlowEcsScopes() {\n const { nodeFactory } = useContext(FlowContext);\n const { flowStore } = useContext(StoreContext);\n const bridge = useEcsBridge();\n const scopes = useScopeList();\n\n const { nodes, setGroups, setNodes } = useFlowStore(\n (state) => ({\n nodes: state.nodes,\n setGroups: state.setGroups,\n setNodes: state.setNodes\n }),\n shallow\n );\n\n useEffect(() => {\n if (!scopes.length) {\n return;\n }\n\n let changed = false;\n const currentNodes = flowStore.instance.getState().nodes;\n const nextNodes = [...currentNodes];\n const groups: Record<string, string[]> = {};\n\n for (const scope of scopes) {\n let groupNode = bridge.ecsFlowRepository.getScopeGroupNode(scope.scopeId);\n\n if (!groupNode) {\n groupNode = nodeFactory.createNodeFromType<ScopeGroupNodeData>(EcsNodeType.scopeGroup);\n groupNode.data.scopeId = scope.scopeId;\n groupNode.data.title = 'Scope';\n groupNode.position = { x: 0, y: 0 };\n groupNode.className = 'react-flow__node-group';\n\n bridge.ecsFlowRepository.addScopeGroupNode(groupNode);\n nextNodes.unshift(groupNode);\n changed = true;\n }\n\n const childIds: string[] = [];\n for (const entity of scope.entities) {\n const entityNode = bridge.ecsFlowRepository.getEntityNode(entity.identity.proxy) as Node<EntityNodeData> | undefined;\n if (!entityNode) {\n continue;\n }\n\n childIds.push(entityNode.id);\n }\n\n groups[groupNode.id] = childIds;\n }\n\n const scopedNodeIds = new Set(Object.values(groups).flat());\n const groupIds = new Set(Object.keys(groups));\n const orderedNodes = nextNodes\n .map((node) => {\n if (groupIds.has(node.id)) {\n return node;\n }\n\n if (node.type !== EcsNodeType.entity) {\n return node;\n }\n\n const parentId = scopedNodeIds.has(node.id)\n ? Object.entries(groups).find(([, children]) => children.includes(node.id))?.[0]\n : undefined;\n\n if (node.parentId !== parentId) {\n changed = true;\n return {\n ...node,\n extent: parentId ? ('parent' as const) : undefined,\n parentId\n };\n }\n\n return node;\n })\n .sort((a, b) => Number(!a.data?.isGroup) - Number(!b.data?.isGroup));\n\n if (changed) {\n setNodes(orderedNodes);\n }\n\n setGroups(groups);\n }, [bridge, flowStore, nodeFactory, nodes, scopes, setGroups, setNodes]);\n\n return <></>;\n}\n\nexport default FlowEcsScopes;\n","import { useFlowStore } from '@awesome-flow/core/hooks';\nimport { FlowState } from '@awesome-flow/core/stores';\nimport { Node } from '@xyflow/react';\nimport { useEffect } from 'react';\nimport { shallow } from 'zustand/shallow';\nimport { EntityNodeData } from '../abstract/node-props';\nimport { EcsNodeType } from '../abstract/node-types';\nimport { useEcsBridge } from '../hooks';\n\nconst selector = (state: FlowState) => ({\n nodes: state.nodes,\n updateNodeData: state.updateNodeData\n});\n\nfunction FlowEcsSpawnEntities() {\n const bridge = useEcsBridge();\n const { nodes, updateNodeData } = useFlowStore(selector, shallow);\n\n useEffect(() => {\n for (const node of nodes as Node<EntityNodeData>[]) {\n if (node.type !== EcsNodeType.entity || !node.data.spawn || node.data.entity) {\n continue;\n }\n\n const update = bridge.enqueueEntitySpawn(node.data.spawn);\n if (!update) {\n updateNodeData<EntityNodeData>(node.id, {\n spawnStatus: 'missing-scheduler'\n });\n continue;\n }\n\n const data: Partial<EntityNodeData> = {\n entity: update.entity,\n entityType: update.entity.entityType,\n spawnStatus: 'queued'\n };\n\n bridge.ecsFlowRepository.addEntityNode({\n ...node,\n data: {\n ...node.data,\n ...data\n }\n });\n updateNodeData<EntityNodeData>(node.id, data);\n }\n }, [bridge, nodes, updateNodeData]);\n\n return <></>;\n}\n\nexport default FlowEcsSpawnEntities;\n","import { FlowContext } from '@awesome-flow/core/abstract';\nimport { useFlowStore } from '@awesome-flow/core/hooks';\nimport { Node } from '@xyflow/react';\nimport { useContext, useEffect } from 'react';\nimport { EcsToolNodeData } from '../abstract/node-props';\nimport { EcsNodeType } from '../abstract/node-types';\nimport { useEcsBridge } from '../hooks';\n\nexport const defaultEcsToolNodes = [\n EcsNodeType.scheduler,\n EcsNodeType.eventTimeline,\n EcsNodeType.telemetry,\n EcsNodeType.updateQueue\n] as const;\n\nexport type EcsToolNodeType = (typeof defaultEcsToolNodes)[number];\n\nexport type FlowEcsToolNodesProps = {\n nodes?: readonly EcsToolNodeType[];\n};\n\nfunction FlowEcsToolNodes({ nodes = defaultEcsToolNodes }: Readonly<FlowEcsToolNodesProps>) {\n const { nodeFactory } = useContext(FlowContext);\n const addNodes = useFlowStore((state) => state.addNodes);\n const bridge = useEcsBridge();\n\n useEffect(() => {\n const nodesToAdd: Node<EcsToolNodeData>[] = [];\n\n nodes.forEach((type, index) => {\n if (bridge.ecsFlowRepository.getToolNode(type)) {\n return;\n }\n\n const node = nodeFactory.createNodeFromType<EcsToolNodeData>(type);\n node.position = { x: 980, y: index * 220 };\n bridge.ecsFlowRepository.addToolNode(node);\n nodesToAdd.push(node);\n });\n\n if (nodesToAdd.length) {\n addNodes(nodesToAdd);\n }\n }, [addNodes, bridge, nodeFactory, nodes]);\n\n return <></>;\n}\n\nexport default FlowEcsToolNodes;\n","import { FlowAutoLayout } from '@awesome-flow/core/canvas';\nimport { memo, useEffect, useState } from 'react';\nimport { useBridgeStoreVersion, useEcsBridge } from '../hooks';\nimport FlowEcsEntities from './flow-ecs-entities';\nimport FlowEcsModules from './flow-ecs-modules';\nimport FlowEcsScopes from './flow-ecs-scopes';\nimport FlowEcsSpawnEntities from './flow-ecs-spawn-entities';\nimport FlowEcsToolNodes, { EcsToolNodeType } from './flow-ecs-tool-nodes';\n\nexport type FlowEcsStateProps = {\n showSystemModules: boolean;\n showEntities: boolean;\n autoLayout: boolean;\n enableEntitySpawning?: boolean;\n showScopes?: boolean;\n toolNodes?: boolean | readonly EcsToolNodeType[];\n};\n\nfunction FlowEcsState(props: Readonly<FlowEcsStateProps>) {\n const [refreshLayout, setRefreshLayout] = useState(false);\n const bridge = useEcsBridge();\n const entityVersion = useBridgeStoreVersion('entities');\n const moduleVersion = useBridgeStoreVersion('modules');\n\n useEffect(() => {\n setRefreshLayout(false);\n const frame = requestAnimationFrame(() => setRefreshLayout(true));\n\n return () => cancelAnimationFrame(frame);\n }, [bridge.ecsFlowRepository.sizeNodes, entityVersion, moduleVersion]);\n\n return (\n <>\n {props.showSystemModules && <FlowEcsModules />}\n {props.showEntities && <FlowEcsEntities />}\n {props.enableEntitySpawning && <FlowEcsSpawnEntities />}\n {props.showScopes && <FlowEcsScopes />}\n {props.toolNodes && <FlowEcsToolNodes nodes={Array.isArray(props.toolNodes) ? props.toolNodes : undefined} />}\n {props.autoLayout && <FlowAutoLayout refreshLayout={refreshLayout} />}\n </>\n );\n}\n\nexport default memo(FlowEcsState);\n","import {\n FlowCanvasContext,\n FlowCanvasDropWrapper,\n FlowCanvasRenderIntersections,\n FlowCanvasWrapper,\n FlowConnectionStatus,\n FlowEdgesSelection,\n FlowTemplatesList\n} from '@awesome-flow/core/canvas';\nimport { Portal } from '@mantine/core';\nimport { useState } from 'react';\nimport { ecsNodeTemplates, ecsNodeTypes } from '../abstract/node-types';\nimport FlowEcsState, { FlowEcsStateProps } from '../flow/flow-ecs-state';\nimport { useEntityTypeTemplates } from '../hooks';\n\nexport type FlowEcsCanvasProps = Partial<FlowEcsStateProps> & {\n enableDragDrop?: boolean;\n showEntityTypeTemplates?: boolean;\n showTemplates?: boolean;\n};\n\nexport function FlowEcsCanvas({\n autoLayout = true,\n enableEntitySpawning = true,\n enableDragDrop = true,\n showEntities = true,\n showEntityTypeTemplates = true,\n showScopes = true,\n showSystemModules = true,\n showTemplates = false,\n toolNodes = false\n}: Readonly<FlowEcsCanvasProps>) {\n const [over, setOver] = useState(false);\n const entityTypeTemplates = useEntityTypeTemplates(showEntityTypeTemplates);\n const canvas = <FlowCanvasRenderIntersections canvasHighlighted={over} nodeTypes={ecsNodeTypes} />;\n\n return (\n <FlowCanvasContext nodeTemplates={ecsNodeTemplates}>\n {enableDragDrop ? (\n <FlowCanvasDropWrapper setOver={setOver}>{canvas}</FlowCanvasDropWrapper>\n ) : (\n <FlowCanvasWrapper>{canvas}</FlowCanvasWrapper>\n )}\n <FlowEdgesSelection />\n <FlowConnectionStatus />\n <FlowEcsState\n autoLayout={autoLayout}\n enableEntitySpawning={enableEntitySpawning}\n showEntities={showEntities}\n showScopes={showScopes}\n showSystemModules={showSystemModules}\n toolNodes={toolNodes}\n />\n {showTemplates && (\n <Portal target=\"#portal-navbar\">\n <FlowTemplatesList extraTemplates={entityTypeTemplates} nodeTypes={ecsNodeTypes} />\n </Portal>\n )}\n </FlowCanvasContext>\n );\n}\n"],"mappings":";;;;;;;;;;;AAUA,SAAAQ,mBAAAC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CACE,MAAA,EAAAJ,mBAA2BE;CAE3B,MAAAG,YAAkBZ,aAAaa,OAA8C;CAE7E,MAAAC,SAAeT,aAAa;CAC5B,MAAAU,gBAAsBX,sBAAsB,SAAS;CAAE,IAAAY;CAAA,IAAAN,E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,KAAA;EApBHC,MAAA,qBAAC,mBAAD;GAAkC1C,eAAAA;aAAlC;IACGmC;IAKDC;IACAC;IACAG;IAQCC;GAhBe;;EAqBE7B,EAAA,MAAAuB;EAAAvB,EAAA,MAAA4B;EAAA5B,EAAA,MAAA6B;EAAA7B,EAAA,MAAA8B;CAAA,OAAAA,MAAA9B,EAAA;CAAA,OArBpB8B;AAqBoB"}
|
package/dist/context/index.cjs
CHANGED
|
@@ -134,7 +134,6 @@ var EcsBridge = class {
|
|
|
134
134
|
entityProxyRepository;
|
|
135
135
|
entityRepository;
|
|
136
136
|
entityScheduler;
|
|
137
|
-
entityUpdateQueue;
|
|
138
137
|
performanceTimer;
|
|
139
138
|
stores;
|
|
140
139
|
systemsModuleRepository;
|
|
@@ -152,7 +151,6 @@ var EcsBridge = class {
|
|
|
152
151
|
this.entityProxyRepository = input.entityProxyRepository;
|
|
153
152
|
this.entityRepository = input.entityRepository;
|
|
154
153
|
this.entityScheduler = input.entityScheduler;
|
|
155
|
-
this.entityUpdateQueue = input.entityUpdateQueue;
|
|
156
154
|
this.defaultScopeId = input.defaultScopeId;
|
|
157
155
|
this.performanceTimer = input.performanceTimer;
|
|
158
156
|
this.systemsModuleRepository = input.systemsModuleRepository;
|
|
@@ -205,7 +203,7 @@ var EcsBridge = class {
|
|
|
205
203
|
descriptors.set(descriptor.id, descriptor);
|
|
206
204
|
}
|
|
207
205
|
for (const entity of this.entityRepository.listAll()) {
|
|
208
|
-
const { entityType } = entity.
|
|
206
|
+
const { entityType } = entity.identity.proxy;
|
|
209
207
|
if (!explicitEntityTypes.has(entityTypeKey(entityType))) {
|
|
210
208
|
const descriptor = normalizeEntityTypeDescriptor({ entityType });
|
|
211
209
|
descriptors.set(descriptor.id, descriptor);
|
|
@@ -308,11 +306,11 @@ var EcsBridge = class {
|
|
|
308
306
|
};
|
|
309
307
|
}
|
|
310
308
|
getUpdateQueueSnapshot(limit) {
|
|
311
|
-
if (!this.
|
|
312
|
-
const items = this.
|
|
309
|
+
if (!this.entityScheduler) return;
|
|
310
|
+
const items = this.entityScheduler.inspectDirtyUpdates();
|
|
313
311
|
return {
|
|
314
312
|
items: limit ? items.slice(-limit) : items,
|
|
315
|
-
size: this.
|
|
313
|
+
size: this.entityScheduler.dirtyCount
|
|
316
314
|
};
|
|
317
315
|
}
|
|
318
316
|
createEntitySpawnUpdate(spawn) {
|
|
@@ -342,9 +340,9 @@ var EcsBridge = class {
|
|
|
342
340
|
};
|
|
343
341
|
}
|
|
344
342
|
enqueueEntitySpawn(spawn) {
|
|
345
|
-
if (!this.
|
|
343
|
+
if (!this.entityScheduler) return;
|
|
346
344
|
const update = this.createEntitySpawnUpdate(spawn);
|
|
347
|
-
this.
|
|
345
|
+
this.entityScheduler.enqueue(update);
|
|
348
346
|
return update;
|
|
349
347
|
}
|
|
350
348
|
listSystemsModules() {
|
|
@@ -371,7 +369,7 @@ var EcsBridge = class {
|
|
|
371
369
|
instrumentRepositories() {
|
|
372
370
|
this.unsubscribeInstrumentation.push(instrumentMethod(this.entityRepository, "set", (args) => {
|
|
373
371
|
const entity = args[0];
|
|
374
|
-
if (entity?.
|
|
372
|
+
if (entity?.identity.proxy) this.bumpUpdate(entity.identity.proxy.entityUid, "updates");
|
|
375
373
|
this.stores.entities.notify();
|
|
376
374
|
this.stores.entityTypes.notify();
|
|
377
375
|
this.stores.scopes.notify();
|
|
@@ -432,9 +430,9 @@ var EcsBridge = class {
|
|
|
432
430
|
this.stores.metrics.notify();
|
|
433
431
|
}), instrumentMethod(this.entityScheduler, "schedule", () => {
|
|
434
432
|
this.stores.scheduler.notify();
|
|
435
|
-
}), instrumentMethod(this.entityScheduler, "
|
|
433
|
+
}), instrumentMethod(this.entityScheduler, "removeSchedule", () => {
|
|
436
434
|
this.stores.scheduler.notify();
|
|
437
|
-
}), instrumentMethod(this.entityScheduler, "
|
|
435
|
+
}), instrumentMethod(this.entityScheduler, "clearSchedules", () => {
|
|
438
436
|
this.stores.scheduler.notify();
|
|
439
437
|
}), instrumentMethod(this.entityScheduler, "skipEntityType", () => {
|
|
440
438
|
this.stores.scheduler.notify();
|
|
@@ -444,12 +442,18 @@ var EcsBridge = class {
|
|
|
444
442
|
this.stores.scheduler.notify();
|
|
445
443
|
}), instrumentMethod(this.entityScheduler, "resume", () => {
|
|
446
444
|
this.stores.scheduler.notify();
|
|
447
|
-
}), instrumentMethod(this.
|
|
445
|
+
}), instrumentMethod(this.entityScheduler, "enqueue", () => {
|
|
448
446
|
this.stores.queue.notify();
|
|
449
|
-
|
|
447
|
+
this.stores.scheduler.notify();
|
|
448
|
+
}), instrumentMethod(this.entityScheduler, "enqueueEvent", () => {
|
|
450
449
|
this.stores.queue.notify();
|
|
451
|
-
|
|
450
|
+
this.stores.scheduler.notify();
|
|
451
|
+
}), instrumentMethod(this.entityScheduler, "enqueueEvents", () => {
|
|
452
452
|
this.stores.queue.notify();
|
|
453
|
+
this.stores.scheduler.notify();
|
|
454
|
+
}), instrumentMethod(this.entityScheduler, "clearDirtyUpdates", () => {
|
|
455
|
+
this.stores.queue.notify();
|
|
456
|
+
this.stores.scheduler.notify();
|
|
453
457
|
}));
|
|
454
458
|
}
|
|
455
459
|
};
|