@awesome-flow/ecs 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +137 -138
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -5
- package/dist/index.d.ts +9 -5
- package/dist/index.js +119 -121
- package/dist/index.js.map +1 -1
- package/package.json +6 -7
package/dist/index.cjs
CHANGED
|
@@ -38,28 +38,23 @@ __export(src_exports, {
|
|
|
38
38
|
FlowEcsState: () => flow_ecs_state_default,
|
|
39
39
|
SystemsModuleNode: () => node_systems_module_default,
|
|
40
40
|
SystemsModuleNodeTemplate: () => SystemsModuleNodeTemplate,
|
|
41
|
+
ecsNodeTemplates: () => ecsNodeTemplates,
|
|
41
42
|
ecsNodeTypes: () => ecsNodeTypes
|
|
42
43
|
});
|
|
43
44
|
module.exports = __toCommonJS(src_exports);
|
|
44
45
|
|
|
45
|
-
// src/
|
|
46
|
+
// src/abstract/ecs-flow-context.ts
|
|
46
47
|
var import_react = require("react");
|
|
47
|
-
var EcsFlowContext = (0, import_react.createContext)(
|
|
48
|
-
ecsFlowRepository: null,
|
|
49
|
-
entityRepository: null,
|
|
50
|
-
entityEventsManager: null,
|
|
51
|
-
entityUpdateCounter: null,
|
|
52
|
-
systemsModuleRepository: null
|
|
53
|
-
});
|
|
48
|
+
var EcsFlowContext = (0, import_react.createContext)(null);
|
|
54
49
|
|
|
55
50
|
// src/utils/id-generator.ts
|
|
56
|
-
var
|
|
51
|
+
var EcsIdGenerator = class {
|
|
57
52
|
static entityProxy(proxy) {
|
|
58
53
|
return `${proxy.entityType}:${proxy.entityUid}`;
|
|
59
54
|
}
|
|
60
55
|
};
|
|
61
56
|
|
|
62
|
-
// src/
|
|
57
|
+
// src/abstract/ecs-flow-repository.ts
|
|
63
58
|
var EcsFlowRepository = class {
|
|
64
59
|
nodes;
|
|
65
60
|
constructor() {
|
|
@@ -75,20 +70,20 @@ var EcsFlowRepository = class {
|
|
|
75
70
|
return this.nodes.get(entityType.toString());
|
|
76
71
|
}
|
|
77
72
|
addEntityNode(node) {
|
|
78
|
-
this.nodes.set(
|
|
73
|
+
this.nodes.set(EcsIdGenerator.entityProxy(node.data.entity), node);
|
|
79
74
|
}
|
|
80
75
|
getEntityNode(entity) {
|
|
81
|
-
return this.nodes.get(
|
|
76
|
+
return this.nodes.get(EcsIdGenerator.entityProxy(entity));
|
|
82
77
|
}
|
|
83
78
|
listAllNodes() {
|
|
84
79
|
return Array.from(this.nodes.values());
|
|
85
80
|
}
|
|
86
81
|
};
|
|
87
82
|
|
|
88
|
-
// src/
|
|
89
|
-
var
|
|
83
|
+
// src/flow/flow-ecs-state.tsx
|
|
84
|
+
var import_react21 = require("react");
|
|
90
85
|
|
|
91
|
-
// src/
|
|
86
|
+
// src/flow/flow-ecs-auto-layout.tsx
|
|
92
87
|
var import_abstract = require("@awesome-flow/core/abstract");
|
|
93
88
|
var import_dagre = __toESM(require("@dagrejs/dagre"), 1);
|
|
94
89
|
var import_react2 = require("@xyflow/react");
|
|
@@ -146,19 +141,23 @@ function FlowEcsAutoLayout(props) {
|
|
|
146
141
|
}
|
|
147
142
|
var flow_ecs_auto_layout_default = FlowEcsAutoLayout;
|
|
148
143
|
|
|
149
|
-
// src/
|
|
144
|
+
// src/flow/flow-ecs-entities.tsx
|
|
150
145
|
var import_abstract4 = require("@awesome-flow/core/abstract");
|
|
151
|
-
var
|
|
146
|
+
var import_react19 = require("react");
|
|
152
147
|
|
|
153
148
|
// src/nodes/node-systems-module.tsx
|
|
154
149
|
var import_layout = require("@awesome-flow/core/layout");
|
|
155
150
|
var import_react7 = require("react");
|
|
151
|
+
var import_core4 = require("@mantine/core");
|
|
156
152
|
|
|
157
153
|
// src/layout/systems-module-layout.tsx
|
|
158
154
|
var import_systems = require("@awesome-ecs/abstract/systems");
|
|
159
155
|
var import_core3 = require("@mantine/core");
|
|
160
156
|
var import_react6 = require("react");
|
|
161
157
|
|
|
158
|
+
// src/components/pipeline-middleware-list.tsx
|
|
159
|
+
var import_core2 = require("@mantine/core");
|
|
160
|
+
|
|
162
161
|
// src/components/badge-list.tsx
|
|
163
162
|
var import_core = require("@mantine/core");
|
|
164
163
|
var import_react5 = require("react");
|
|
@@ -184,7 +183,6 @@ function BadgeList(props) {
|
|
|
184
183
|
var badge_list_default = (0, import_react5.memo)(BadgeList);
|
|
185
184
|
|
|
186
185
|
// src/components/pipeline-middleware-list.tsx
|
|
187
|
-
var import_core2 = require("@mantine/core");
|
|
188
186
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
189
187
|
function PipelineMiddlewareList(props) {
|
|
190
188
|
let middleware = [];
|
|
@@ -206,7 +204,7 @@ var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
|
206
204
|
function SystemsModuleLayout(props) {
|
|
207
205
|
const { module: module2 } = props;
|
|
208
206
|
const runtimeContext = module2["runtimeContext"];
|
|
209
|
-
const systemContext = runtimeContext
|
|
207
|
+
const { systemContext } = runtimeContext;
|
|
210
208
|
const { status } = (0, import_react6.useMemo)(() => {
|
|
211
209
|
return systemContext.runtime;
|
|
212
210
|
}, [systemContext.runtime.status]);
|
|
@@ -230,7 +228,6 @@ function SystemsModuleLayout(props) {
|
|
|
230
228
|
var systems_module_layout_default = SystemsModuleLayout;
|
|
231
229
|
|
|
232
230
|
// src/nodes/node-systems-module.tsx
|
|
233
|
-
var import_core4 = require("@mantine/core");
|
|
234
231
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
235
232
|
function SystemsModuleNode({ id, data, selected, type }) {
|
|
236
233
|
const { systemsModuleRepository } = (0, import_react7.useContext)(EcsFlowContext);
|
|
@@ -240,9 +237,8 @@ function SystemsModuleNode({ id, data, selected, type }) {
|
|
|
240
237
|
{
|
|
241
238
|
id,
|
|
242
239
|
selected,
|
|
243
|
-
|
|
240
|
+
data,
|
|
244
241
|
title: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_core4.Badge, { fullWidth: true, color: "indigo", variant: "transparent", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(formatter_camel_case_default, { value: data.entityType }) }),
|
|
245
|
-
templateId: data.templateId,
|
|
246
242
|
type,
|
|
247
243
|
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(systems_module_layout_default, { type: data.entityType, module: module2 })
|
|
248
244
|
}
|
|
@@ -311,7 +307,7 @@ var import_react11 = require("react");
|
|
|
311
307
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
312
308
|
function EntityProxyList(props) {
|
|
313
309
|
const proxies = Array.from(props.entity.proxies.values()).map((c) => c.values());
|
|
314
|
-
const items = proxies.map((p) => Array.from(p).map((k) =>
|
|
310
|
+
const items = proxies.map((p) => Array.from(p).map((k) => EcsIdGenerator.entityProxy(k))).flat();
|
|
315
311
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core8.Accordion.Item, { value: "proxies", children: [
|
|
316
312
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Accordion.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Badge, { fullWidth: true, variant: "light", rightSection: items.length, children: "Proxies" }) }),
|
|
317
313
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Accordion.Panel, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Stack, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(badge_list_default, { items, badge: { variant: "outline" } }) }) })
|
|
@@ -386,9 +382,8 @@ function EntityNode({ id, data, selected, type }) {
|
|
|
386
382
|
{
|
|
387
383
|
id,
|
|
388
384
|
selected,
|
|
389
|
-
|
|
385
|
+
data,
|
|
390
386
|
title: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Badge, { fullWidth: true, variant: "transparent", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(formatter_camel_case_default, { value: entity.myProxy.entityType }) }),
|
|
391
|
-
templateId: data.templateId,
|
|
392
387
|
type,
|
|
393
388
|
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(entity_layout_default, { entity })
|
|
394
389
|
}
|
|
@@ -396,7 +391,88 @@ function EntityNode({ id, data, selected, type }) {
|
|
|
396
391
|
}
|
|
397
392
|
var node_entity_default = EntityNode;
|
|
398
393
|
|
|
399
|
-
// src/node
|
|
394
|
+
// src/templates/template-entity-node.ts
|
|
395
|
+
var import_utils = require("@awesome-flow/core/utils");
|
|
396
|
+
var import_react15 = require("@xyflow/react");
|
|
397
|
+
|
|
398
|
+
// src/abstract/handle-types.ts
|
|
399
|
+
var EcsHandleDataType = /* @__PURE__ */ ((EcsHandleDataType2) => {
|
|
400
|
+
EcsHandleDataType2[EcsHandleDataType2["proxy"] = 1] = "proxy";
|
|
401
|
+
EcsHandleDataType2[EcsHandleDataType2["module"] = 2] = "module";
|
|
402
|
+
return EcsHandleDataType2;
|
|
403
|
+
})(EcsHandleDataType || {});
|
|
404
|
+
|
|
405
|
+
// src/templates/template-entity-node.ts
|
|
406
|
+
var EntityNodeTemplate = class {
|
|
407
|
+
create() {
|
|
408
|
+
const data = {
|
|
409
|
+
title: "Entity",
|
|
410
|
+
entity: null
|
|
411
|
+
};
|
|
412
|
+
return {
|
|
413
|
+
id: import_utils.IDGenerator.template(),
|
|
414
|
+
removable: false,
|
|
415
|
+
type: "entity-node" /* entity */,
|
|
416
|
+
data,
|
|
417
|
+
handles: [
|
|
418
|
+
{
|
|
419
|
+
dataType: 1 /* proxy */,
|
|
420
|
+
position: import_react15.Position.Left,
|
|
421
|
+
connection: "target",
|
|
422
|
+
disabled: true
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
dataType: 1 /* proxy */,
|
|
426
|
+
position: import_react15.Position.Right,
|
|
427
|
+
connection: "source",
|
|
428
|
+
disabled: true
|
|
429
|
+
}
|
|
430
|
+
]
|
|
431
|
+
};
|
|
432
|
+
}
|
|
433
|
+
isHandleAllowed() {
|
|
434
|
+
return false;
|
|
435
|
+
}
|
|
436
|
+
getHandleAllowedDataType() {
|
|
437
|
+
return 1 /* proxy */;
|
|
438
|
+
}
|
|
439
|
+
};
|
|
440
|
+
|
|
441
|
+
// src/templates/template-systems-module.ts
|
|
442
|
+
var import_utils2 = require("@awesome-flow/core/utils");
|
|
443
|
+
var import_react16 = require("@xyflow/react");
|
|
444
|
+
var SystemsModuleNodeTemplate = class {
|
|
445
|
+
create() {
|
|
446
|
+
const data = {
|
|
447
|
+
title: "Systems Module",
|
|
448
|
+
entityType: null,
|
|
449
|
+
handles: null,
|
|
450
|
+
templateId: null
|
|
451
|
+
};
|
|
452
|
+
return {
|
|
453
|
+
id: import_utils2.IDGenerator.template(),
|
|
454
|
+
removable: false,
|
|
455
|
+
type: "systems-module-node" /* systemsModule */,
|
|
456
|
+
data,
|
|
457
|
+
handles: [
|
|
458
|
+
{
|
|
459
|
+
dataType: 2 /* module */,
|
|
460
|
+
position: import_react16.Position.Left,
|
|
461
|
+
connection: "target",
|
|
462
|
+
disabled: true
|
|
463
|
+
}
|
|
464
|
+
]
|
|
465
|
+
};
|
|
466
|
+
}
|
|
467
|
+
isHandleAllowed() {
|
|
468
|
+
return false;
|
|
469
|
+
}
|
|
470
|
+
getHandleAllowedDataType() {
|
|
471
|
+
return 2 /* module */;
|
|
472
|
+
}
|
|
473
|
+
};
|
|
474
|
+
|
|
475
|
+
// src/abstract/node-types.ts
|
|
400
476
|
var EcsNodeType = /* @__PURE__ */ ((EcsNodeType2) => {
|
|
401
477
|
EcsNodeType2["systemsModule"] = "systems-module-node";
|
|
402
478
|
EcsNodeType2["entity"] = "entity-node";
|
|
@@ -406,25 +482,29 @@ var ecsNodeTypes = {
|
|
|
406
482
|
["systems-module-node" /* systemsModule */]: node_systems_module_default,
|
|
407
483
|
["entity-node" /* entity */]: node_entity_default
|
|
408
484
|
};
|
|
485
|
+
var ecsNodeTemplates = {
|
|
486
|
+
["entity-node" /* entity */]: new EntityNodeTemplate(),
|
|
487
|
+
["systems-module-node" /* systemsModule */]: new SystemsModuleNodeTemplate()
|
|
488
|
+
};
|
|
409
489
|
|
|
410
|
-
// src/
|
|
411
|
-
var
|
|
490
|
+
// src/flow/flow-ecs-edge-proxies.tsx
|
|
491
|
+
var import_react17 = require("react");
|
|
412
492
|
var import_abstract2 = require("@awesome-flow/core/abstract");
|
|
413
493
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
414
494
|
function FlowEcsEdgeProxies(props) {
|
|
415
495
|
const { nodesToConnect } = props;
|
|
416
|
-
const context = (0,
|
|
496
|
+
const context = (0, import_react17.useContext)(import_abstract2.FlowContext);
|
|
417
497
|
const onConnect = context.useFlowStore((state) => state.onConnect);
|
|
418
|
-
const { ecsFlowRepository, entityRepository } = (0,
|
|
419
|
-
(0,
|
|
498
|
+
const { ecsFlowRepository, entityRepository } = (0, import_react17.useContext)(EcsFlowContext);
|
|
499
|
+
(0, import_react17.useEffect)(() => {
|
|
420
500
|
for (const node of nodesToConnect) {
|
|
421
|
-
const sourceHandle = node.data.handles.find((h) => h.
|
|
501
|
+
const sourceHandle = node.data.handles.find((h) => h.connection === "source");
|
|
422
502
|
const entity = entityRepository.get(node.data.entity);
|
|
423
503
|
for (const [, proxyMap] of entity.proxies) {
|
|
424
504
|
for (const proxy of proxyMap.values()) {
|
|
425
505
|
const proxyNode = ecsFlowRepository.getEntityNode(proxy);
|
|
426
506
|
if (proxyNode) {
|
|
427
|
-
const targetHandle = proxyNode.data.handles.find((h) => h.
|
|
507
|
+
const targetHandle = proxyNode.data.handles.find((h) => h.connection === "target");
|
|
428
508
|
onConnect({
|
|
429
509
|
source: node.id,
|
|
430
510
|
target: proxyNode.id,
|
|
@@ -440,21 +520,21 @@ function FlowEcsEdgeProxies(props) {
|
|
|
440
520
|
}
|
|
441
521
|
var flow_ecs_edge_proxies_default = FlowEcsEdgeProxies;
|
|
442
522
|
|
|
443
|
-
// src/
|
|
444
|
-
var
|
|
523
|
+
// src/flow/flow-ecs-edge-modules.tsx
|
|
524
|
+
var import_react18 = require("react");
|
|
445
525
|
var import_abstract3 = require("@awesome-flow/core/abstract");
|
|
446
526
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
447
527
|
function FlowEcsEdgeModules(props) {
|
|
448
528
|
const { nodesToConnect } = props;
|
|
449
|
-
const context = (0,
|
|
529
|
+
const context = (0, import_react18.useContext)(import_abstract3.FlowContext);
|
|
450
530
|
const onConnect = context.useFlowStore((state) => state.onConnect);
|
|
451
|
-
const { ecsFlowRepository, entityRepository } = (0,
|
|
452
|
-
(0,
|
|
531
|
+
const { ecsFlowRepository, entityRepository } = (0, import_react18.useContext)(EcsFlowContext);
|
|
532
|
+
(0, import_react18.useEffect)(() => {
|
|
453
533
|
for (const node of nodesToConnect) {
|
|
454
|
-
const sourceHandle = node.data.handles.find((h) => h.
|
|
534
|
+
const sourceHandle = node.data.handles.find((h) => h.connection === "source");
|
|
455
535
|
const entity = entityRepository.get(node.data.entity);
|
|
456
536
|
const systemModule = ecsFlowRepository.getSystemModuleNode(entity.myProxy.entityType);
|
|
457
|
-
const targetHandle = systemModule?.data.handles.find((h) => h.
|
|
537
|
+
const targetHandle = systemModule?.data.handles.find((h) => h.connection === "target");
|
|
458
538
|
if (targetHandle) {
|
|
459
539
|
onConnect({
|
|
460
540
|
source: node.id,
|
|
@@ -462,7 +542,6 @@ function FlowEcsEdgeModules(props) {
|
|
|
462
542
|
sourceHandle: sourceHandle.id,
|
|
463
543
|
targetHandle: targetHandle.id
|
|
464
544
|
});
|
|
465
|
-
console.log("CONNECTING MODULE", node.id, systemModule.id);
|
|
466
545
|
}
|
|
467
546
|
}
|
|
468
547
|
}, [nodesToConnect]);
|
|
@@ -470,14 +549,14 @@ function FlowEcsEdgeModules(props) {
|
|
|
470
549
|
}
|
|
471
550
|
var flow_ecs_edge_modules_default = FlowEcsEdgeModules;
|
|
472
551
|
|
|
473
|
-
// src/
|
|
552
|
+
// src/flow/flow-ecs-entities.tsx
|
|
474
553
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
475
554
|
function FlowEcsEntities() {
|
|
476
|
-
const context = (0,
|
|
555
|
+
const context = (0, import_react19.useContext)(import_abstract4.FlowContext);
|
|
477
556
|
const addNodes = context.useFlowStore((state) => state.addNodes);
|
|
478
|
-
const { ecsFlowRepository, entityRepository } = (0,
|
|
479
|
-
const [entityNodes, setEntityNodes] = (0,
|
|
480
|
-
(0,
|
|
557
|
+
const { ecsFlowRepository, entityRepository } = (0, import_react19.useContext)(EcsFlowContext);
|
|
558
|
+
const [entityNodes, setEntityNodes] = (0, import_react19.useState)([]);
|
|
559
|
+
(0, import_react19.useEffect)(() => {
|
|
481
560
|
const entities = entityRepository.listAll();
|
|
482
561
|
const nodes = [];
|
|
483
562
|
for (const entity of entities) {
|
|
@@ -500,15 +579,15 @@ function FlowEcsEntities() {
|
|
|
500
579
|
}
|
|
501
580
|
var flow_ecs_entities_default = FlowEcsEntities;
|
|
502
581
|
|
|
503
|
-
// src/
|
|
504
|
-
var
|
|
582
|
+
// src/flow/flow-ecs-modules.tsx
|
|
583
|
+
var import_react20 = require("react");
|
|
505
584
|
var import_abstract5 = require("@awesome-flow/core/abstract");
|
|
506
585
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
507
586
|
function FlowEcsModules() {
|
|
508
|
-
const context = (0,
|
|
587
|
+
const context = (0, import_react20.useContext)(import_abstract5.FlowContext);
|
|
509
588
|
const addNodes = context.useFlowStore((state) => state.addNodes);
|
|
510
|
-
const { ecsFlowRepository, systemsModuleRepository } = (0,
|
|
511
|
-
(0,
|
|
589
|
+
const { ecsFlowRepository, systemsModuleRepository } = (0, import_react20.useContext)(EcsFlowContext);
|
|
590
|
+
(0, import_react20.useEffect)(() => {
|
|
512
591
|
const modules = Array.from(systemsModuleRepository.list()).filter((m) => !!m);
|
|
513
592
|
const keys = Array.from(modules.values()).map((v) => v[0]);
|
|
514
593
|
const nodesToAdd = [];
|
|
@@ -532,16 +611,16 @@ function FlowEcsModules() {
|
|
|
532
611
|
}
|
|
533
612
|
var flow_ecs_modules_default = FlowEcsModules;
|
|
534
613
|
|
|
535
|
-
// src/
|
|
614
|
+
// src/flow/flow-ecs-state.tsx
|
|
536
615
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
537
616
|
function FlowEcsState(props) {
|
|
538
|
-
const [, setUpdates] = (0,
|
|
539
|
-
const [needsLayout, setNeedsLayout] = (0,
|
|
540
|
-
const { ecsFlowRepository } = (0,
|
|
541
|
-
(0,
|
|
617
|
+
const [, setUpdates] = (0, import_react21.useState)(0);
|
|
618
|
+
const [needsLayout, setNeedsLayout] = (0, import_react21.useState)(false);
|
|
619
|
+
const { ecsFlowRepository } = (0, import_react21.useContext)(EcsFlowContext);
|
|
620
|
+
(0, import_react21.useEffect)(() => {
|
|
542
621
|
setNeedsLayout(true);
|
|
543
622
|
}, [ecsFlowRepository.sizeNodes]);
|
|
544
|
-
(0,
|
|
623
|
+
(0, import_react21.useEffect)(() => {
|
|
545
624
|
setInterval(() => {
|
|
546
625
|
setUpdates((updates) => updates + 1);
|
|
547
626
|
}, 1e3);
|
|
@@ -553,87 +632,6 @@ function FlowEcsState(props) {
|
|
|
553
632
|
] });
|
|
554
633
|
}
|
|
555
634
|
var flow_ecs_state_default = FlowEcsState;
|
|
556
|
-
|
|
557
|
-
// src/templates/template-entity-node.ts
|
|
558
|
-
var import_utils = require("@awesome-flow/core/utils");
|
|
559
|
-
|
|
560
|
-
// src/handle-types.ts
|
|
561
|
-
var EcsHandleDataType = /* @__PURE__ */ ((EcsHandleDataType2) => {
|
|
562
|
-
EcsHandleDataType2[EcsHandleDataType2["proxy"] = 1] = "proxy";
|
|
563
|
-
EcsHandleDataType2[EcsHandleDataType2["module"] = 2] = "module";
|
|
564
|
-
return EcsHandleDataType2;
|
|
565
|
-
})(EcsHandleDataType || {});
|
|
566
|
-
|
|
567
|
-
// src/templates/template-entity-node.ts
|
|
568
|
-
var import_react20 = require("@xyflow/react");
|
|
569
|
-
var EntityNodeTemplate = class {
|
|
570
|
-
create() {
|
|
571
|
-
const data = {
|
|
572
|
-
title: "Entity",
|
|
573
|
-
entity: null
|
|
574
|
-
};
|
|
575
|
-
return {
|
|
576
|
-
id: import_utils.IDGenerator.template(),
|
|
577
|
-
removable: false,
|
|
578
|
-
type: "entity-node" /* entity */,
|
|
579
|
-
data,
|
|
580
|
-
handles: [
|
|
581
|
-
{
|
|
582
|
-
dataType: 1 /* proxy */,
|
|
583
|
-
position: import_react20.Position.Left,
|
|
584
|
-
type: "target",
|
|
585
|
-
disabled: true
|
|
586
|
-
},
|
|
587
|
-
{
|
|
588
|
-
dataType: 1 /* proxy */,
|
|
589
|
-
position: import_react20.Position.Right,
|
|
590
|
-
type: "source",
|
|
591
|
-
disabled: true
|
|
592
|
-
}
|
|
593
|
-
]
|
|
594
|
-
};
|
|
595
|
-
}
|
|
596
|
-
isHandleAllowed() {
|
|
597
|
-
return false;
|
|
598
|
-
}
|
|
599
|
-
getHandleAllowedDataType() {
|
|
600
|
-
return void 0;
|
|
601
|
-
}
|
|
602
|
-
};
|
|
603
|
-
|
|
604
|
-
// src/templates/template-systems-module.ts
|
|
605
|
-
var import_utils2 = require("@awesome-flow/core/utils");
|
|
606
|
-
var import_react21 = require("@xyflow/react");
|
|
607
|
-
var SystemsModuleNodeTemplate = class {
|
|
608
|
-
create() {
|
|
609
|
-
const data = {
|
|
610
|
-
title: "Systems Module",
|
|
611
|
-
entityType: null,
|
|
612
|
-
handles: null,
|
|
613
|
-
templateId: null
|
|
614
|
-
};
|
|
615
|
-
return {
|
|
616
|
-
id: import_utils2.IDGenerator.template(),
|
|
617
|
-
removable: false,
|
|
618
|
-
type: "systems-module-node" /* systemsModule */,
|
|
619
|
-
data,
|
|
620
|
-
handles: [
|
|
621
|
-
{
|
|
622
|
-
dataType: 2 /* module */,
|
|
623
|
-
position: import_react21.Position.Left,
|
|
624
|
-
type: "target",
|
|
625
|
-
disabled: true
|
|
626
|
-
}
|
|
627
|
-
]
|
|
628
|
-
};
|
|
629
|
-
}
|
|
630
|
-
isHandleAllowed() {
|
|
631
|
-
return false;
|
|
632
|
-
}
|
|
633
|
-
getHandleAllowedDataType() {
|
|
634
|
-
return void 0;
|
|
635
|
-
}
|
|
636
|
-
};
|
|
637
635
|
// Annotate the CommonJS export names for ESM import in node:
|
|
638
636
|
0 && (module.exports = {
|
|
639
637
|
EcsFlowContext,
|
|
@@ -645,6 +643,7 @@ var SystemsModuleNodeTemplate = class {
|
|
|
645
643
|
FlowEcsState,
|
|
646
644
|
SystemsModuleNode,
|
|
647
645
|
SystemsModuleNodeTemplate,
|
|
646
|
+
ecsNodeTemplates,
|
|
648
647
|
ecsNodeTypes
|
|
649
648
|
});
|
|
650
649
|
//# sourceMappingURL=index.cjs.map
|