@mantaq/viz 0.2.1 → 0.2.3

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/README.md CHANGED
@@ -35,7 +35,7 @@ Take a step with a panel button, by clicking a pulsing edge, or by clicking a st
35
35
  | `edge.to` | `null` = **undetermined**: only for actors that carry no `to` declarations |
36
36
  | `edge.origin` | `declared` (builder `to`, vouched for by the type checker) · `probe` (synthetic traversal, undeclared actors) · `fuzz` (observed only while fuzzing) |
37
37
  | `edge.explanation` | `null` (no handler: initial/effect, or AST not run) · `{ status: "analyzed", location, registration, branches, payloadReads, contextReads, contextWrites, readsActorState, comparisons, literals }` · `{ status: "not_analyzed", location, reason, snippet }` |
38
- | `edge.doc` | leading JSDoc of the `m.on` / `m.onAny` call behind the edge; `null` = undocumented, no handler, or AST not run |
38
+ | `edge.doc` | leading JSDoc of the `m.on` / `m.onAny` call behind the edge, or of the `m.effect` calls of the state for an `effect` edge (joined in order); `null` = undocumented, no handler, or AST not run |
39
39
  | `machine.fuzz` | `null` or `{ seed, iterations, corpus: [{ steps, discovered }], errors: [{ from, event, message, steps }] }`; every sequence is shrunk and replayable from a fresh actor |
40
40
 
41
41
  Bump `VIZ_SCHEMA_VERSION` on any breaking change. The validator accepts only the current version.
@@ -765,8 +765,13 @@ function effectsSection(doc, machine, current) {
765
765
  if (effects.length === 0) return null;
766
766
  const unhandled = unhandledSends(machine, current);
767
767
  const isUnhandled = (effect, event) => unhandled.some((each) => each.effect === effect && each.event === event);
768
+ const effectDoc = machine.edges.find((edge) => edge.kind === "effect" && edge.from === current)?.doc;
768
769
  return html(doc, "div", { class: "explore-effects" }, [
769
770
  html(doc, "p", {}, [`Entering ${current} runs:`]),
771
+ docNote(doc, {
772
+ text: effectDoc ?? null,
773
+ scope: "edge"
774
+ }),
770
775
  html(doc, "ul", {}, effects.map((effect) => {
771
776
  const sends = effect.sends ?? [];
772
777
  const summary = effect.sends === null ? html(doc, "span", { class: "muted" }, [" (sends not declared)"]) : sends.length === 0 ? " sends nothing" : " sends ";
package/dist/page.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import "./html-BfvuzJs6.mjs";
2
- import { n as showIssues, t as mountVizText } from "./embed-QX7vRXoL.mjs";
2
+ import { n as showIssues, t as mountVizText } from "./embed-D3r1M511.mjs";
3
3
  // src/viewer/page.ts
4
4
  /**
5
5
  * Whole-page entries: a self-contained HTML file (`mountEmbedded`) and a live
package/dist/viewer.mjs CHANGED
@@ -1 +1 @@
1
- export { r as FUZZ_NOTE, i as STRUCTURE_BANNER, a as mountViewer, t as mountVizText, n as showIssues } from "./embed-QX7vRXoL.mjs";
1
+ export { r as FUZZ_NOTE, i as STRUCTURE_BANNER, a as mountViewer, t as mountVizText, n as showIssues } from "./embed-D3r1M511.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mantaq/viz",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Draw and walk a Mantaq machine in the browser, from a versioned, deterministic JSON document.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@dagrejs/dagre": "^3.1.2",
32
- "@mantaq/utils": "0.0.4"
32
+ "@mantaq/utils": "0.0.5"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@typescript/native-preview": "7.0.0-dev.20260707.2",