libpetri 2.13.0 → 3.0.1

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.
Files changed (48) hide show
  1. package/README.md +89 -130
  2. package/dist/chunk-6NH64RCU.js +1016 -0
  3. package/dist/chunk-6NH64RCU.js.map +1 -0
  4. package/dist/{chunk-7VJ5CYUU.js → chunk-JZIEWVAV.js} +905 -62
  5. package/dist/chunk-JZIEWVAV.js.map +1 -0
  6. package/dist/{chunk-JVI5HFRX.js → chunk-VCDOKWVU.js} +2 -2
  7. package/dist/{chunk-E3ZWB645.js → chunk-YVIPJ6KM.js} +1 -1
  8. package/dist/chunk-YVIPJ6KM.js.map +1 -0
  9. package/dist/debug/index.d.ts +2 -2
  10. package/dist/debug/index.js +2 -2
  11. package/dist/doclet/index.d.ts +12 -3
  12. package/dist/doclet/index.js +8 -4
  13. package/dist/doclet/index.js.map +1 -1
  14. package/dist/doclet/resources/petrinet-diagrams.css +21 -0
  15. package/dist/doclet/resources/petrinet-diagrams.js +3575 -3573
  16. package/dist/dot-exporter-3STXYK74.js +9 -0
  17. package/dist/{render-ZGZEZ5RK.js → elk-place-YVNQFGXI.js} +3 -258
  18. package/dist/elk-place-YVNQFGXI.js.map +1 -0
  19. package/dist/{event-store-DKTenPbC.d.ts → event-store-BFX_yJ8I.d.ts} +1 -1
  20. package/dist/export/index.d.ts +1 -1
  21. package/dist/export/index.js +2 -2
  22. package/dist/index.d.ts +91 -38
  23. package/dist/index.js +368 -294
  24. package/dist/index.js.map +1 -1
  25. package/dist/pan-zoom-Cp51IkDl.d.ts +33 -0
  26. package/dist/{petri-net-C3LSY-vm.d.ts → petri-net-WSScMyDL.d.ts} +43 -29
  27. package/dist/preprocess-FN3F75JR.js +193 -0
  28. package/dist/preprocess-FN3F75JR.js.map +1 -0
  29. package/dist/render-QOHGDWNE.js +78 -0
  30. package/dist/render-QOHGDWNE.js.map +1 -0
  31. package/dist/render-dom/index.d.ts +28 -29
  32. package/dist/render-dom/index.js +14 -21
  33. package/dist/render-dom/index.js.map +1 -1
  34. package/dist/verification/index.d.ts +273 -7
  35. package/dist/verification/index.js +7 -1
  36. package/dist/verification/index.js.map +1 -1
  37. package/dist/viewer/index.d.ts +24 -32
  38. package/dist/viewer/index.js +9 -1003
  39. package/dist/viewer/index.js.map +1 -1
  40. package/dist/viewer/viewer.css +21 -0
  41. package/dist/viewer/viewer.iife.js +3575 -3573
  42. package/package.json +2 -2
  43. package/dist/chunk-7VJ5CYUU.js.map +0 -1
  44. package/dist/chunk-E3ZWB645.js.map +0 -1
  45. package/dist/dot-exporter-SHBYMMJ3.js +0 -9
  46. package/dist/render-ZGZEZ5RK.js.map +0 -1
  47. /package/dist/{chunk-JVI5HFRX.js.map → chunk-VCDOKWVU.js.map} +0 -0
  48. /package/dist/{dot-exporter-SHBYMMJ3.js.map → dot-exporter-3STXYK74.js.map} +0 -0
@@ -1,34 +1,6 @@
1
- import panzoom from 'panzoom';
2
-
3
- /**
4
- * Pan/zoom wrapper for the canonical libpetri viewer.
5
- *
6
- * Delegates to the `panzoom` library (no hand-rolled wheel handlers — we
7
- * intentionally drop the IIFE/javadoc version's bespoke math in favour of
8
- * a single battle-tested implementation). Defaults match the old debug-ui
9
- * and dev-preview values so the canonical viewer feels identical to what
10
- * users had before.
11
- *
12
- * @module viewer/pan-zoom
13
- */
14
-
15
- type PanzoomInstance = ReturnType<typeof panzoom>;
16
- type PanzoomOptions = Parameters<typeof panzoom>[1];
17
- /**
18
- * Default panzoom configuration shared across all viewer surfaces.
19
- *
20
- * - `maxZoom: 1000` — effectively unlimited; lets users dive into ~150-node
21
- * diagrams without hitting an artificial ceiling.
22
- * - `minZoom: 0.02` — allows fitting very large nets in a small viewport.
23
- * - `smoothScroll: false` — sharper interactive feel.
24
- * - `zoomDoubleClickSpeed: 1` — single-click double-zoom toggle.
25
- */
26
- declare const DEFAULT_PANZOOM_OPTS: {
27
- readonly smoothScroll: false;
28
- readonly zoomDoubleClickSpeed: 1;
29
- readonly maxZoom: 1000;
30
- readonly minZoom: 0.02;
31
- };
1
+ import { P as PanzoomInstance, a as PanzoomOptions } from '../pan-zoom-Cp51IkDl.js';
2
+ export { D as DEFAULT_PANZOOM_OPTS } from '../pan-zoom-Cp51IkDl.js';
3
+ import 'panzoom';
32
4
 
33
5
  /**
34
6
  * Cluster overlay for the canonical libpetri viewer.
@@ -115,6 +87,26 @@ interface VisibilityState {
115
87
  /** CSS custom property names that the canonical stylesheet honours. */
116
88
  declare const VIEWER_CSS_VARIABLES: readonly ["--lpv-bg", "--lpv-header-bg", "--lpv-border", "--lpv-text", "--lpv-muted", "--lpv-cluster-bg", "--lpv-cluster-bg-collapsed", "--lpv-cluster-stroke-width", "--lpv-cluster-stroke-dash", "--lpv-cluster-fill-tint", "--lpv-dim-opacity", "--lpv-active-filter-outline", "--lpv-legend-bg", "--lpv-chip-bg", "--lpv-chip-active-bg", "--lpv-sidebar-bg", "--lpv-sidebar-border", "--lpv-sidebar-text", "--lpv-sidebar-muted", "--lpv-sidebar-chip-bg", "--lpv-sidebar-chip-hover-bg", "--lpv-sidebar-chip-off-opacity", "--lpv-shared-glyph-color", "--lpv-replica-fill", "--lpv-replica-stroke", "--lpv-highlight-stroke", "--lpv-highlight-glow", "--lpv-neighbor-stroke", "--lpv-faded-node-opacity", "--lpv-faded-edge-opacity", "--lpv-faded-cluster-opacity"];
117
89
 
90
+ /**
91
+ * Build-stamped viewer version.
92
+ *
93
+ * The bundle carries the version of the `libpetri` package it was built from,
94
+ * so a generated doc page can say which viewer drew it. Doc generators stamp
95
+ * this onto the diagram container as `data-libpetri-viewer`; without it a page
96
+ * rendered by an old bundle (e.g. pre-2.10.5, whose edges are Graphviz-routed
97
+ * diagonals rather than the ELK orthogonal routes) is indistinguishable from a
98
+ * current one except by reading pixels.
99
+ *
100
+ * `__LIBPETRI_VIEWER_VERSION__` is substituted at build time by both bundlers
101
+ * (`tsup.config.ts` for the ESM output, `scripts/build-viewer-iife.mjs` for the
102
+ * IIFE). When the source is loaded directly, as vitest does, the identifier is
103
+ * simply absent and the `typeof` guard falls through to the dev sentinel.
104
+ *
105
+ * @module viewer/version
106
+ */
107
+ /** Version of the `libpetri` package this viewer bundle was built from. */
108
+ declare const VERSION: string;
109
+
118
110
  /**
119
111
  * Graph pre-processing for the C0-replicate-default layout pipeline.
120
112
  *
@@ -357,4 +349,4 @@ interface MountOptions {
357
349
  */
358
350
  declare function mount(dotSource: string, container: HTMLElement, opts?: MountOptions): Promise<ViewerHandle>;
359
351
 
360
- export { type ClusterDescriptor, type ClusterLayout, DEFAULT_PANZOOM_OPTS, type ElkLayoutConfig, type LeafPackingOptions, type MountOptions, type PanzoomInstance, type PanzoomOptions, type SubnetVisibility, VIEWER_CSS_VARIABLES, type ViewerHandle, colorForPrefix, discoverClusters, mount };
352
+ export { type ClusterDescriptor, type ClusterLayout, type ElkLayoutConfig, type LeafPackingOptions, type MountOptions, PanzoomInstance, PanzoomOptions, type SubnetVisibility, VERSION, VIEWER_CSS_VARIABLES, type ViewerHandle, colorForPrefix, discoverClusters, mount };