@walterra/pi-graphviz 0.0.2 → 0.0.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
@@ -24,13 +24,13 @@ Renders a Graphviz DOT specification as a PNG image.
24
24
 
25
25
  ### Parameters
26
26
 
27
- | Parameter | Type | Required | Description |
28
- |-----------|------|----------|-------------|
29
- | `dot` | string | ✅ | Graphviz DOT specification |
30
- | `engine` | string | | Layout engine: dot (default), neato, fdp, circo, twopi |
31
- | `width` | number | | Output width in pixels |
32
- | `height` | number | | Output height in pixels |
33
- | `save_path` | string | | Optional file path (.png or .svg) |
27
+ | Parameter | Type | Required | Description |
28
+ | ----------- | ------ | -------- | ------------------------------------------------------ |
29
+ | `dot` | string | ✅ | Graphviz DOT specification |
30
+ | `engine` | string | | Layout engine: dot (default), neato, fdp, circo, twopi |
31
+ | `width` | number | | Output width in pixels |
32
+ | `height` | number | | Output height in pixels |
33
+ | `save_path` | string | | Optional file path (.png or .svg) |
34
34
 
35
35
  ### Example
36
36
 
@@ -38,11 +38,11 @@ Renders a Graphviz DOT specification as a PNG image.
38
38
  digraph G {
39
39
  rankdir=LR;
40
40
  node [shape=box style="rounded,filled" fillcolor=lightblue];
41
-
41
+
42
42
  A [label="Start"];
43
43
  B [label="Process"];
44
44
  C [label="End" fillcolor=lightgreen];
45
-
45
+
46
46
  A -> B [label="step 1"];
47
47
  B -> C [label="step 2"];
48
48
  }
@@ -59,7 +59,7 @@ digraph G {
59
59
 
60
60
  ## Reference Documentation
61
61
 
62
- See [graphviz-reference.md](./extensions/graphviz-chart/graphviz-reference.md) for comprehensive documentation on:
62
+ See [graphviz-reference.md](./extensions/graphviz-chart/graphviz-reference.md) for documentation on:
63
63
 
64
64
  - DOT language syntax
65
65
  - All node shapes and edge styles
@@ -13,18 +13,18 @@
13
13
  * - Network topologies
14
14
  */
15
15
 
16
- import type { ExtensionAPI } from '@mariozechner/pi-coding-agent';
17
- import { Type } from '@sinclair/typebox';
18
16
  import { execSync } from 'node:child_process';
19
17
  import { existsSync, mkdirSync, readFileSync, unlinkSync, writeFileSync } from 'node:fs';
20
18
  import { tmpdir } from 'node:os';
21
19
  import { dirname, join } from 'node:path';
22
20
  import { fileURLToPath } from 'node:url';
21
+ import type { ExtensionAPI } from '@mariozechner/pi-coding-agent';
22
+ import { Type } from '@sinclair/typebox';
23
23
 
24
24
  // Compute reference path using ESM import.meta.url
25
25
  const GRAPHVIZ_REFERENCE_PATH = join(
26
26
  dirname(fileURLToPath(import.meta.url)),
27
- 'graphviz-reference.md',
27
+ 'graphviz-reference.md'
28
28
  );
29
29
 
30
30
  export default function (pi: ExtensionAPI) {
@@ -81,23 +81,23 @@ Reference: https://graphviz.org/doc/info/lang.html`,
81
81
  Type.String({
82
82
  description:
83
83
  'Layout engine: dot (hierarchical, default), neato (spring), fdp (force-directed), circo (circular), twopi (radial)',
84
- }),
84
+ })
85
85
  ),
86
86
  width: Type.Optional(
87
87
  Type.Number({
88
88
  description: 'Output width in pixels (default: auto based on graph)',
89
- }),
89
+ })
90
90
  ),
91
91
  height: Type.Optional(
92
92
  Type.Number({
93
93
  description: 'Output height in pixels (default: auto based on graph)',
94
- }),
94
+ })
95
95
  ),
96
96
  save_path: Type.Optional(
97
97
  Type.String({
98
98
  description:
99
99
  'Optional file path to save the chart. Format determined by extension: .svg for SVG, .png for PNG (default)',
100
- }),
100
+ })
101
101
  ),
102
102
  }),
103
103
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@walterra/pi-graphviz",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "Graphviz chart extension for pi coding agent - render DOT diagrams as inline images",
5
5
  "type": "module",
6
6
  "files": [
@@ -18,6 +18,7 @@
18
18
  "directory": "packages/pi-graphviz"
19
19
  },
20
20
  "keywords": [
21
+ "pi-package",
21
22
  "pi",
22
23
  "pi-coding-agent",
23
24
  "extension",