libpetri 2.3.2 → 2.5.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.
@@ -0,0 +1,8 @@
1
+ import {
2
+ dotExport
3
+ } from "./chunk-2GAZLDH3.js";
4
+ import "./chunk-FN773SSE.js";
5
+ export {
6
+ dotExport
7
+ };
8
+ //# sourceMappingURL=dot-exporter-7YDFCBKC.js.map
@@ -1,4 +1,4 @@
1
- import { T as Token } from './petri-net-CKZYPOsL.js';
1
+ import { T as Token } from './petri-net-DXdpd0r5.js';
2
2
 
3
3
  /**
4
4
  * Events emitted during Petri Net execution.
@@ -1,4 +1,4 @@
1
- import { P as PetriNet } from '../petri-net-CKZYPOsL.js';
1
+ import { P as PetriNet } from '../petri-net-DXdpd0r5.js';
2
2
 
3
3
  /**
4
4
  * Format-agnostic typed graph model.
@@ -133,12 +133,32 @@ declare function edgeStyle(arcType: EdgeCategory): EdgeVisual;
133
133
  * @module export/petri-net-mapper
134
134
  */
135
135
 
136
+ /**
137
+ * Selects how DOT export groups nodes into `subgraph cluster_*` blocks (per
138
+ * **MOD-040** / **EXP-016**).
139
+ *
140
+ * - `'auto'` — use subnet-membership metadata (per MOD-026) when the net
141
+ * carries any; otherwise fall back to instance-prefix name detection.
142
+ * Default.
143
+ * - `'metadata'` — strictly cluster from subnet-membership metadata; a node
144
+ * with no metadata entry — including a prefix-named instance node — is not
145
+ * clustered. Use `'auto'` to also cluster prefix-named nodes.
146
+ * - `'prefix'` — always cluster from instance-prefix name segments; ignore
147
+ * metadata.
148
+ * - `'none'` — emit no clusters; every node renders at the top level.
149
+ */
150
+ type ClusterSource = 'auto' | 'metadata' | 'prefix' | 'none';
136
151
  interface DotConfig {
137
152
  readonly direction: RankDir;
138
153
  readonly showTypes: boolean;
139
154
  readonly showIntervals: boolean;
140
155
  readonly showPriority: boolean;
141
156
  readonly environmentPlaces?: ReadonlySet<string>;
157
+ /**
158
+ * How to group nodes into `subgraph cluster_*` blocks (per MOD-040 /
159
+ * EXP-016). Additive; defaults to `'auto'` when omitted.
160
+ */
161
+ readonly clusterSource?: ClusterSource;
142
162
  }
143
163
  declare const DEFAULT_DOT_CONFIG: DotConfig;
144
164
  /** Sanitizes a name for use as a graph node ID. */
@@ -173,4 +193,4 @@ declare function renderDot(graph: Graph): string;
173
193
  */
174
194
  declare function dotExport(net: PetriNet, config?: DotConfig): string;
175
195
 
176
- export { type ArrowHead, DEFAULT_DOT_CONFIG, type DotConfig, type EdgeCategory, type EdgeLineStyle, type EdgeVisual, FONT, GRAPH, type Graph, type GraphEdge, type GraphNode, type NodeCategory, type NodeShape, type NodeVisual, type RankDir, type Subgraph, dotExport, edgeStyle, mapToGraph, nodeStyle, renderDot, sanitize };
196
+ export { type ArrowHead, type ClusterSource, DEFAULT_DOT_CONFIG, type DotConfig, type EdgeCategory, type EdgeLineStyle, type EdgeVisual, FONT, GRAPH, type Graph, type GraphEdge, type GraphNode, type NodeCategory, type NodeShape, type NodeVisual, type RankDir, type Subgraph, dotExport, edgeStyle, mapToGraph, nodeStyle, renderDot, sanitize };
@@ -8,7 +8,7 @@ import {
8
8
  nodeStyle,
9
9
  renderDot,
10
10
  sanitize
11
- } from "../chunk-B2CV5M3L.js";
11
+ } from "../chunk-2GAZLDH3.js";
12
12
  import "../chunk-FN773SSE.js";
13
13
  export {
14
14
  DEFAULT_DOT_CONFIG,
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { P as PetriNet, S as SubnetDef, a as Place, T as Token, b as Transition, E as EnvironmentPlace, c as TransitionContext, O as Out } from './petri-net-CKZYPOsL.js';
2
- export { A as Arc, d as ArcInhibitor, e as ArcInput, f as ArcOutput, g as ArcRead, h as ArcReset, C as Channel, i as ComposeBindings, F as FusionSet, j as FusionSetBuilder, I as In, k as InAll, l as InAtLeast, m as InExactly, n as InOne, o as Instance, p as Interface, q as InterfaceBuilder, L as LogFn, M as MAX_DURATION_MS, r as OutAnd, s as OutForwardInput, t as OutPlace, u as OutTimeout, v as OutXor, w as OutputEntry, x as PetriNetBuilder, y as Port, z as PortDirection, B as SubnetDefBuilder, D as SubnetInstance, G as Timing, H as TimingDeadline, J as TimingDelayed, K as TimingExact, N as TimingImmediate, Q as TimingWindow, R as TokenInput, U as TokenOutput, V as TransitionAction, W as TransitionBuilder, X as VerificationHarness, Y as VerificationResult, Z as all, _ as allPlaces, $ as and, a0 as andPlaces, a1 as arcPlace, a2 as atLeast, a3 as consumptionCount, a4 as deadline, a5 as delayed, a6 as earliest, a7 as enumerateBranches, a8 as environmentPlace, a9 as exact, aa as exactly, ab as fork, ac as forwardInput, ad as hasDeadline, ae as hasGuard, af as immediate, ag as inhibitorArc, ah as inputArc, ai as isUnit, aj as latest, ak as matchesGuard, al as one, am as outPlace, an as outputArc, ao as passthrough, ap as place, aq as produce, ar as readArc, as as requiredCount, at as resetArc, au as timeout, av as timeoutPlace, aw as tokenAt, ax as tokenOf, ay as transform, az as transformAsync, aA as transformFrom, aB as unitToken, aC as window, aD as withTimeout, aE as xor, aF as xorPlaces } from './petri-net-CKZYPOsL.js';
3
- import { E as EventStore } from './event-store-I3QiQABh.js';
4
- export { A as ActionTimedOut, a as ExecutionCompleted, b as ExecutionStarted, I as InMemoryEventStore, L as LogMessage, M as MarkingSnapshot, N as NetEvent, T as TokenAdded, c as TokenRemoved, d as TransitionClockRestarted, e as TransitionCompleted, f as TransitionEnabled, g as TransitionFailed, h as TransitionStarted, i as TransitionTimedOut, j as eventTransitionName, k as eventsOfType, l as failures, m as filterEvents, n as inMemoryEventStore, o as isFailureEvent, p as noopEventStore, t as transitionEvents } from './event-store-I3QiQABh.js';
1
+ import { P as PetriNet, S as SubnetDef, a as Place, T as Token, b as Transition, E as EnvironmentPlace, c as TransitionContext, O as Out } from './petri-net-DXdpd0r5.js';
2
+ export { A as Arc, d as ArcInhibitor, e as ArcInput, f as ArcOutput, g as ArcRead, h as ArcReset, C as Channel, i as ComposeBindings, F as FusionSet, j as FusionSetBuilder, I as In, k as InAll, l as InAtLeast, m as InExactly, n as InOne, o as Instance, p as Interface, q as InterfaceBuilder, L as LogFn, M as MAX_DURATION_MS, r as OutAnd, s as OutForwardInput, t as OutPlace, u as OutTimeout, v as OutXor, w as OutputEntry, x as PetriNetBuilder, y as Port, z as PortDirection, B as SubnetDefBuilder, D as SubnetInstance, G as Timing, H as TimingDeadline, J as TimingDelayed, K as TimingExact, N as TimingImmediate, Q as TimingWindow, R as TokenInput, U as TokenOutput, V as TransitionAction, W as TransitionBuilder, X as VerificationHarness, Y as VerificationResult, Z as all, _ as allPlaces, $ as and, a0 as andPlaces, a1 as arcPlace, a2 as atLeast, a3 as consumptionCount, a4 as deadline, a5 as delayed, a6 as earliest, a7 as enumerateBranches, a8 as environmentPlace, a9 as exact, aa as exactly, ab as fork, ac as forwardInput, ad as hasDeadline, ae as hasGuard, af as immediate, ag as inhibitorArc, ah as inputArc, ai as isUnit, aj as latest, ak as matchesGuard, al as one, am as outPlace, an as outputArc, ao as passthrough, ap as place, aq as produce, ar as readArc, as as requiredCount, at as resetArc, au as timeout, av as timeoutPlace, aw as tokenAt, ax as tokenOf, ay as transform, az as transformAsync, aA as transformFrom, aB as unitToken, aC as window, aD as withTimeout, aE as xor, aF as xorPlaces } from './petri-net-DXdpd0r5.js';
3
+ import { E as EventStore } from './event-store-z30VMn0T.js';
4
+ export { A as ActionTimedOut, a as ExecutionCompleted, b as ExecutionStarted, I as InMemoryEventStore, L as LogMessage, M as MarkingSnapshot, N as NetEvent, T as TokenAdded, c as TokenRemoved, d as TransitionClockRestarted, e as TransitionCompleted, f as TransitionEnabled, g as TransitionFailed, h as TransitionStarted, i as TransitionTimedOut, j as eventTransitionName, k as eventsOfType, l as failures, m as filterEvents, n as inMemoryEventStore, o as isFailureEvent, p as noopEventStore, t as transitionEvents } from './event-store-z30VMn0T.js';
5
5
 
6
6
  /**
7
7
  * Discriminated sum-type abstraction over Petri nets, distinguishing **closed**