@rotorsoft/act-diagram 0.3.2 → 0.3.4

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.js CHANGED
@@ -426,18 +426,12 @@ function mockSlice(onBuild) {
426
426
  const reaction = {
427
427
  event: eventName,
428
428
  handlerName: typeof handler?.name === "string" && handler.name || `on ${eventName}`,
429
- dispatches,
430
- isVoid: false
429
+ dispatches
431
430
  };
432
431
  info.reactions.push(reaction);
433
432
  return {
434
433
  ...builder,
435
434
  to() {
436
- reaction.isVoid = false;
437
- return builder;
438
- },
439
- void() {
440
- reaction.isVoid = true;
441
435
  return builder;
442
436
  }
443
437
  };
@@ -468,8 +462,7 @@ function mockProjection(target, onBuild) {
468
462
  to(resolver) {
469
463
  if (typeof resolver === "string") info.target = resolver;
470
464
  return builder;
471
- },
472
- void: () => builder
465
+ }
473
466
  };
474
467
  }
475
468
  };
@@ -510,18 +503,12 @@ function mockAct(onBuild) {
510
503
  const reaction = {
511
504
  event: eventName,
512
505
  handlerName: typeof handler?.name === "string" && handler.name || `on ${eventName}`,
513
- dispatches,
514
- isVoid: false
506
+ dispatches
515
507
  };
516
508
  info.reactions.push(reaction);
517
509
  return {
518
510
  ...builder,
519
511
  to() {
520
- reaction.isVoid = false;
521
- return builder;
522
- },
523
- void() {
524
- reaction.isVoid = true;
525
512
  return builder;
526
513
  }
527
514
  };
@@ -1301,14 +1288,12 @@ function computeLayout(viewModel) {
1301
1288
  const eventReactions = /* @__PURE__ */ new Map();
1302
1289
  for (const slice of viewModel.slices) {
1303
1290
  for (const r of slice.reactions) {
1304
- if (r.isVoid) continue;
1305
1291
  const list = eventReactions.get(r.event) ?? [];
1306
1292
  list.push(r.handlerName);
1307
1293
  eventReactions.set(r.event, list);
1308
1294
  }
1309
1295
  }
1310
1296
  for (const r of viewModel.reactions) {
1311
- if (r.isVoid) continue;
1312
1297
  const list = eventReactions.get(r.event) ?? [];
1313
1298
  list.push(r.handlerName);
1314
1299
  eventReactions.set(r.event, list);
@@ -1381,7 +1366,6 @@ function computeLayout(viewModel) {
1381
1366
  const sliceEdgeStart = es.length;
1382
1367
  const sliceReactionsByEvent = /* @__PURE__ */ new Map();
1383
1368
  for (const r of slice.reactions) {
1384
- if (r.isVoid) continue;
1385
1369
  const list = sliceReactionsByEvent.get(r.event) ?? [];
1386
1370
  list.push(r);
1387
1371
  sliceReactionsByEvent.set(r.event, list);
@@ -1558,7 +1542,7 @@ function computeLayout(viewModel) {
1558
1542
  partIdx++;
1559
1543
  }
1560
1544
  for (const r of slice.reactions) {
1561
- if (r.isVoid || visitedReactions.has(r.handlerName)) continue;
1545
+ if (visitedReactions.has(r.handlerName)) continue;
1562
1546
  const rX = sliceRightX + GAP * 2;
1563
1547
  const rp = { x: rX, y };
1564
1548
  ns.push({
@@ -1696,7 +1680,6 @@ function computeLayout(viewModel) {
1696
1680
  if (viewModel.reactions.length > 0) {
1697
1681
  const reactionYByEvent = /* @__PURE__ */ new Map();
1698
1682
  for (const r of viewModel.reactions) {
1699
- if (r.isVoid) continue;
1700
1683
  const trigNode = ns.find(
1701
1684
  (n) => n.type === "event" && n.label === r.event
1702
1685
  );