@rotorsoft/act-diagram 1.4.0 → 1.4.2

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
@@ -671,7 +671,7 @@ function mock_state(entry, on_build) {
671
671
  archives: () => action_builder(_currentAction),
672
672
  // Disclosure predicate for `sensitive()` fields. Same reasoning as
673
673
  // the close-policy methods above: the diagram doesn't render it, but
674
- // the chain must survive or the whole state is dropped (#1394).
674
+ // the chain must survive or the whole state is dropped.
675
675
  discloses: () => action_builder(_currentAction),
676
676
  build: () => {
677
677
  on_build?.(info);
@@ -746,7 +746,7 @@ function mock_slice(on_build) {
746
746
  return builder;
747
747
  },
748
748
  // Lane declaration — the diagram doesn't render lanes, but the chain
749
- // must survive or the slice is dropped (#1394).
749
+ // must survive or the slice is dropped.
750
750
  withLane() {
751
751
  return builder;
752
752
  },
@@ -792,7 +792,7 @@ function mock_projection(target, on_build) {
792
792
  // State-projection (fold) form: `projection(n).of(State, ...).flush(fn)`.
793
793
  // The folded state's own events are what the projection handles, so
794
794
  // record them from each passed state — that is what makes the
795
- // projection show up as a consumer of those events (#1394).
795
+ // projection show up as a consumer of those events.
796
796
  of(...states) {
797
797
  for (const st of states) {
798
798
  const events = st?.events;
@@ -854,7 +854,7 @@ function mock_act(on_build) {
854
854
  },
855
855
  withActor: () => builder,
856
856
  // Lane declaration — not rendered, but the chain must survive or the
857
- // whole orchestrator is dropped from the model (#1394).
857
+ // whole orchestrator is dropped from the model.
858
858
  withLane: () => builder,
859
859
  on(event_name) {
860
860
  return {
@@ -1222,7 +1222,7 @@ function position_at(content, index) {
1222
1222
  const before = content.slice(0, index);
1223
1223
  const line = before.split("\n").length;
1224
1224
  const last_nl = before.lastIndexOf("\n");
1225
- const col = index - (last_nl >= 0 ? last_nl : 0);
1225
+ const col = index - Math.max(last_nl, 0);
1226
1226
  return { line, col };
1227
1227
  }
1228
1228
  function build_patterns(esc, type) {
@@ -2458,7 +2458,7 @@ function Diagram({
2458
2458
  title: "@rotorsoft/act-diagram version",
2459
2459
  children: [
2460
2460
  "v",
2461
- "1.3.0"
2461
+ "1.4.1"
2462
2462
  ]
2463
2463
  }
2464
2464
  )