@ts-graphviz/ast 2.0.7 → 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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,172 @@
1
1
  # @ts-graphviz/ast
2
2
 
3
+ ## 3.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1480](https://github.com/ts-graphviz/ts-graphviz/pull/1480) [`ab5d0c7`](https://github.com/ts-graphviz/ts-graphviz/commit/ab5d0c75620a0fd1bf36373716b26c2d433a0bc6) Thanks [@kamiazya](https://github.com/kamiazya)! - Fix CI workflow to prevent publishing stable releases with @next tag
8
+
9
+ - Updated dependencies [[`ab5d0c7`](https://github.com/ts-graphviz/ts-graphviz/commit/ab5d0c75620a0fd1bf36373716b26c2d433a0bc6)]:
10
+ - @ts-graphviz/common@3.0.1
11
+
12
+ ## 3.0.0
13
+
14
+ ### Major Changes
15
+
16
+ - [#1363](https://github.com/ts-graphviz/ts-graphviz/pull/1363) [`9328563`](https://github.com/ts-graphviz/ts-graphviz/commit/932856396ed0dede1dfc6737344a628f9667d07c) Thanks [@kamiazya](https://github.com/kamiazya)! - 🚨 Breaking Changes: Drop Node.js 18 support
17
+
18
+ Minimum required version is now Node.js 20+
19
+
20
+ ### ESM-Only Distribution
21
+
22
+ - **Remove CommonJS builds**: All packages now distribute only ESM (ECMAScript Modules)
23
+ - **Package exports**: Removed `require` fields from `package.json` exports
24
+ - **Module type**: All packages are now `"type": "module"`
25
+
26
+ ## 🔄 Migration Guide
27
+
28
+ ### For ESM Projects (Recommended)
29
+
30
+ ```json
31
+ {
32
+ "type": "module"
33
+ }
34
+ ```
35
+
36
+ ```typescript
37
+ // Import syntax remains unchanged
38
+ import { Digraph, Node, Edge, toDot } from "ts-graphviz";
39
+ import { toFile } from "ts-graphviz/adapter";
40
+ import { parse } from "ts-graphviz/ast";
41
+ ```
42
+
43
+ ### For CommonJS Projects
44
+
45
+ If you are using CommonJS (CJS) and need to migrate to ESM, you will need to update your project to support dynamic imports. This is necessary because the packages no longer provide CommonJS builds.
46
+
47
+ ### Before (CJS)
48
+
49
+ ```javascript
50
+ // JavaScript (CommonJS)
51
+ function createGraph() {
52
+ // Dynamic import is required because the packages no longer provide CommonJS builds.
53
+ const { Digraph, Node, Edge, toDot } = require("ts-graphviz");
54
+ const graph = new Digraph();
55
+ return toDot(graph);
56
+ }
57
+ ```
58
+
59
+ ### After (ESM)
60
+
61
+ ```javascript
62
+ async function createGraph() {
63
+ const { Digraph, Node, Edge, toDot } = await import("ts-graphviz");
64
+
65
+ const graph = new Digraph();
66
+ // Create your graph...
67
+ return toDot(graph);
68
+ }
69
+ ```
70
+
71
+ ```typescript
72
+ // TypeScript (CommonJS)
73
+ // Update tsconfig.json
74
+ {
75
+ "compilerOptions": {
76
+ "module": "Node16",
77
+ "moduleResolution": "Node16"
78
+ }
79
+ }
80
+
81
+ // Use dynamic imports
82
+ async function createGraph() {
83
+ const tsGraphviz = await import('ts-graphviz');
84
+ const { Digraph, Node, Edge, toDot } = tsGraphviz;
85
+
86
+ const graph = new Digraph();
87
+ // Create your graph...
88
+ return toDot(graph);
89
+ }
90
+ ```
91
+
92
+ ## 🎯 Benefits
93
+
94
+ - **Modern JavaScript**: Leveraging native ES modules for better performance
95
+ - **Smaller bundle sizes**: ESM enables better tree-shaking
96
+ - **Future-proof**: Aligning with the JavaScript ecosystem direction
97
+ - **Better TypeScript support**: Enhanced module resolution
98
+
99
+ - [#1363](https://github.com/ts-graphviz/ts-graphviz/pull/1363) [`9328563`](https://github.com/ts-graphviz/ts-graphviz/commit/932856396ed0dede1dfc6737344a628f9667d07c) Thanks [@kamiazya](https://github.com/kamiazya)! - Adjust HTML label AST handling for consistent behavior #1335
100
+
101
+ Improves the handling of HTML-like labels in the `fromDot` and `toDot` functions to ensure valid Dot output.
102
+
103
+ ### Minor Changes
104
+
105
+ - [#1363](https://github.com/ts-graphviz/ts-graphviz/pull/1363) [`9328563`](https://github.com/ts-graphviz/ts-graphviz/commit/932856396ed0dede1dfc6737344a628f9667d07c) Thanks [@kamiazya](https://github.com/kamiazya)! - Define Supported environment and Support levels
106
+
107
+ To provide clarity on the environments in which ts-graphviz operates, we have categorized support levels:
108
+
109
+ ## Support Levels
110
+
111
+ ### Tier 1: Full Support
112
+
113
+ - **Definition**: Environments that are fully supported, with comprehensive automated testing and maintenance.
114
+ - **Environments**:
115
+ - **Node.js LTS versions**: All active Long-Term Support (LTS) versions.
116
+ - If a Node.js LTS version is released, we will ensure compatibility with it.
117
+ - If a Node.js LTS version is deprecated, we will drop support for it in the next major release.
118
+ - **Details**:
119
+ - We run automated tests on all LTS versions of Node.js.
120
+ - Full compatibility and performance are ensured.
121
+ - Critical issues are prioritized for fixes.
122
+
123
+ ### Tier 2: Active Support
124
+
125
+ - **Definition**: Environments that receive active support with limited automated testing.
126
+ - **Environments**:
127
+ - **Deno Latest LTS version**: The latest Long-Term Support (LTS) version of Deno.
128
+ - If a new Deno LTS version is released, we will ensure compatibility with it.
129
+ - If a Deno LTS version is deprecated, we will drop support for it in the next minor release.
130
+ - **Node.js Current Release**: The latest Node.js release outside the LTS schedule.
131
+ - If a new Node.js current release is available, we will ensure compatibility with it.
132
+ - If a Node.js current release is deprecated, we will drop support for it in the next minor release.
133
+ - **Details**:
134
+ - Compatibility is maintained, and issues are addressed.
135
+
136
+ ### Tier 3: Community Support
137
+
138
+ - **Definition**: Environments that are not officially tested but are supported on a best-effort basis.
139
+ - **Environments**:
140
+ - **Modern Browsers**: Latest versions of major browsers, including:
141
+ - Google Chrome
142
+ - Mozilla Firefox
143
+ - Microsoft Edge
144
+ - Apple Safari
145
+ - **Deno Current Release**: The latest Deno release outside the LTS schedule.
146
+ - **Details**:
147
+ - Installation methods are provided.
148
+ - No automated testing is performed.
149
+ - Issues reported by users will be addressed.
150
+ - Targeting the latest versions ensures compatibility with modern web standards.
151
+ - We will not actively test or maintain compatibility with older versions of browsers.
152
+
153
+ ### Patch Changes
154
+
155
+ - [#1363](https://github.com/ts-graphviz/ts-graphviz/pull/1363) [`9328563`](https://github.com/ts-graphviz/ts-graphviz/commit/932856396ed0dede1dfc6737344a628f9667d07c) Thanks [@kamiazya](https://github.com/kamiazya)! - Update Develop Environment
156
+
157
+ - Drop turbo
158
+ - Upgrade biome to 2.0
159
+ - Upgrade TypeScript to 5.8
160
+ - Upgrade Vite to 7.0
161
+ - Upgrade Vitest to 3.2
162
+ - Upgrade Peggy to 5.0 and drop ts-pegjs
163
+ - Implement new E2E test workflow
164
+
165
+ - [#1363](https://github.com/ts-graphviz/ts-graphviz/pull/1363) [`9328563`](https://github.com/ts-graphviz/ts-graphviz/commit/932856396ed0dede1dfc6737344a628f9667d07c) Thanks [@kamiazya](https://github.com/kamiazya)! - New GitHub Action main workflow and tests
166
+
167
+ - Updated dependencies [[`9328563`](https://github.com/ts-graphviz/ts-graphviz/commit/932856396ed0dede1dfc6737344a628f9667d07c), [`9328563`](https://github.com/ts-graphviz/ts-graphviz/commit/932856396ed0dede1dfc6737344a628f9667d07c), [`9328563`](https://github.com/ts-graphviz/ts-graphviz/commit/932856396ed0dede1dfc6737344a628f9667d07c), [`9328563`](https://github.com/ts-graphviz/ts-graphviz/commit/932856396ed0dede1dfc6737344a628f9667d07c), [`9328563`](https://github.com/ts-graphviz/ts-graphviz/commit/932856396ed0dede1dfc6737344a628f9667d07c)]:
168
+ - @ts-graphviz/common@3.0.0
169
+
3
170
  ## 2.0.7
4
171
 
5
172
  ### Patch Changes
package/README.md CHANGED
@@ -1,42 +1,147 @@
1
- # @ts-graphviz/ast
1
+ <div align="center">
2
2
 
3
- > It is part of the ts-graphviz library, which is split into modular packages to improve maintainability, flexibility, and ease of use.
3
+ [![Main](https://github.com/ts-graphviz/ts-graphviz/actions/workflows/main.yaml/badge.svg)](https://github.com/ts-graphviz/ts-graphviz/actions/workflows/main.yaml)
4
+ [![CodeQL](https://github.com/ts-graphviz/ts-graphviz/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/ts-graphviz/ts-graphviz/actions/workflows/codeql-analysis.yml)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/ts-graphviz/ts-graphviz/blob/main/LICENSE)
6
+ [![All Contributors](https://img.shields.io/github/all-contributors/ts-graphviz/ts-graphviz?color=orange)](#contributors-)
7
+
8
+ [![OpenSSF Best Practices](https://www.bestpractices.dev/projects/8396/badge)](https://www.bestpractices.dev/projects/8396)
9
+ [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/ts-graphviz/ts-graphviz/badge)](https://scorecard.dev/viewer/?uri=github.com/ts-graphviz/ts-graphviz)
10
+ [![Tidelift](https://tidelift.com/badges/package/npm/ts-graphviz?style=flat)](https://tidelift.com/subscription/pkg/npm-ts-graphviz?utm_source=npm-ts-graphviz&utm_medium=readme)
11
+
12
+ [![npm version](https://badge.fury.io/js/ts-graphviz.svg)](https://badge.fury.io/js/ts-graphviz)
13
+ ![node version](https://img.shields.io/node/v/ts-graphviz)
14
+ [![deno version](https://img.shields.io/badge/deno-lts-black?logo=deno)](https://github.com/denoland/deno)
15
+ [![npm](https://img.shields.io/npm/dm/ts-graphviz)](https://npmtrends.com/ts-graphviz)
16
+
17
+ # @ts-graphviz/ast
4
18
 
5
19
  This package contains the module for processing the DOT language at the **A**bstract **S**yntax **T**ree (AST) level for the ts-graphviz library.
6
20
 
7
- ## Features
21
+ 🔗
8
22
 
9
- - Parsing and generating DOT language ASTs
10
- - Functions for manipulating and transforming ASTs
11
- - Support for custom AST nodes and attributes
23
+ [![GitHub](https://img.shields.io/badge/-GitHub-181717?logo=GitHub&style=flat)](https://github.com/ts-graphviz/ts-graphviz)
24
+ [![npm](https://img.shields.io/badge/-npm-CB3837?logo=npm&style=flat)](https://www.npmjs.com/package/ts-graphviz)
25
+ [![Reference](https://img.shields.io/badge/-API_Reference-3178C6?logo=TypeScript&style=flat&logoColor=fff)](https://ts-graphviz.github.io/ts-graphviz/)
26
+ [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/ts-graphviz/ts-graphviz)
12
27
 
13
- ## Usage
28
+ [![Sponsor](https://img.shields.io/badge/-GitHub%20Sponsor-fff?logo=GitHub%20Sponsors&style=flat)](https://github.com/sponsors/ts-graphviz)
29
+ [![OpenCollective](https://img.shields.io/badge/-OpenCollective-7FADF2?logo=opencollective&style=flat&logoColor=white)](https://opencollective.com/ts-graphviz)
14
30
 
15
- Import the necessary functions and classes from the `@ts-graphviz/ast` package:
31
+ [![format: Biome](https://img.shields.io/badge/format%20with-Biome-F7B911?logo=biome&style=flat)](https://biomejs.dev/)
32
+ [![test: Vitest](https://img.shields.io/badge/tested%20with-Vitest-6E9F18?logo=vitest&style=flat)](https://vitest.dev/)
33
+ [![build: Vite](https://img.shields.io/badge/build%20with-Vite-646CFF?logo=vite&style=flat)](https://rollupjs.org/)
16
34
 
17
- ```ts
18
- import { parse, stringify } from '@ts-graphviz/ast';
19
- ```
35
+ </div>
20
36
 
21
- Use the imported items in your project to work with DOT language ASTs:
37
+ ---
22
38
 
23
- ```ts
24
- const dotString = 'digraph G { A -> B; }';
25
- const ast = parse(dotString);
39
+ > It is part of the ts-graphviz library, which is split into modular packages to improve maintainability, flexibility, and ease of use.
26
40
 
27
- const outputDotString = stringify(ast);
28
- console.log('Output DOT string:', outputDotString);
29
- ```
30
41
 
31
- For more examples and usage details, please refer to the ts-graphviz documentation.
42
+ ## Overview
32
43
 
44
+ This package is a foundational component of the ts-graphviz library that enables low-level manipulation of DOT language structures.
45
+ It provides a parser that converts DOT language strings into AST nodes and a stringifier that converts AST nodes back to DOT language.
33
46
 
34
- ## Contributing
47
+ ## Main Functions
35
48
 
36
- Contributions to the ts-graphviz project are welcome.
49
+ The AST package provides several key functions:
37
50
 
38
- Please refer to the main ts-graphviz repository for guidelines on how to contribute.
51
+ - `parse(input: string, options?)`: Parses a DOT language string into an AST structure
52
+ - `stringify(ast: ASTNode)`: Converts an AST structure to a DOT language string
53
+ - `fromModel(model)`: Converts a Graph Model to an AST structure
54
+ - `toModel(ast)`: Converts an AST structure to a Graph Model
39
55
 
40
- ## License
56
+ ## Usage Examples
57
+
58
+ ### Parsing DOT Language
59
+
60
+ ```ts
61
+ import { parse } from "@ts-graphviz/ast";
62
+
63
+ const dotString = "digraph G { A -> B; }";
64
+ const ast = parse(dotString);
65
+ console.log(ast);
66
+ // Output: A DotASTNode representing the DOT structure
67
+ ```
68
+
69
+ ### Generating DOT Language
70
+
71
+ ```ts
72
+ import { parse, stringify } from "@ts-graphviz/ast";
73
+
74
+ const dotString = "digraph G { A -> B; }";
75
+ const ast = parse(dotString);
76
+ // Modify the AST if needed
77
+ const outputDotString = stringify(ast);
78
+ console.log(outputDotString);
79
+ // Output: "digraph G { A -> B; }"
80
+ ```
41
81
 
42
- This package is released under the MIT License.
82
+ ## Error Handling
83
+
84
+ The package provides a specialized error class for handling syntax errors during parsing.
85
+
86
+ When a parsing error occurs, the parser throws a `DotSyntaxError` with detailed information about the issue, which helps in debugging DOT language syntax problems.
87
+
88
+ ## Contributors 👥
89
+
90
+ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
91
+
92
+ <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
93
+ <!-- prettier-ignore-start -->
94
+ <!-- markdownlint-disable -->
95
+ <table>
96
+ <tbody>
97
+ <tr>
98
+ <td align="center" valign="top" width="14.28%"><a href="http://blog.kamiazya.tech/"><img src="https://avatars0.githubusercontent.com/u/35218186?v=4?s=100" width="100px;" alt="Yuki Yamazaki"/><br /><sub><b>Yuki Yamazaki</b></sub></a><br /><a href="https://github.com/ts-graphviz/ts-graphviz/commits?author=kamiazya" title="Code">💻</a> <a href="https://github.com/ts-graphviz/ts-graphviz/commits?author=kamiazya" title="Tests">⚠️</a> <a href="https://github.com/ts-graphviz/ts-graphviz/commits?author=kamiazya" title="Documentation">📖</a> <a href="#ideas-kamiazya" title="Ideas, Planning, & Feedback">🤔</a></td>
99
+ <td align="center" valign="top" width="14.28%"><a href="https://laysent.com"><img src="https://avatars2.githubusercontent.com/u/1191606?v=4?s=100" width="100px;" alt="LaySent"/><br /><sub><b>LaySent</b></sub></a><br /><a href="https://github.com/ts-graphviz/ts-graphviz/issues?q=author%3Alaysent" title="Bug reports">🐛</a> <a href="https://github.com/ts-graphviz/ts-graphviz/commits?author=laysent" title="Tests">⚠️</a></td>
100
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/elasticdotventures"><img src="https://avatars0.githubusercontent.com/u/35611074?v=4?s=100" width="100px;" alt="elasticdotventures"/><br /><sub><b>elasticdotventures</b></sub></a><br /><a href="https://github.com/ts-graphviz/ts-graphviz/commits?author=elasticdotventures" title="Documentation">📖</a></td>
101
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/ChristianMurphy"><img src="https://avatars.githubusercontent.com/u/3107513?v=4?s=100" width="100px;" alt="Christian Murphy"/><br /><sub><b>Christian Murphy</b></sub></a><br /><a href="https://github.com/ts-graphviz/ts-graphviz/commits?author=ChristianMurphy" title="Code">💻</a> <a href="#ideas-ChristianMurphy" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/ts-graphviz/ts-graphviz/commits?author=ChristianMurphy" title="Documentation">📖</a></td>
102
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/ArtemAdamenko"><img src="https://avatars.githubusercontent.com/u/2178516?v=4?s=100" width="100px;" alt="Artem"/><br /><sub><b>Artem</b></sub></a><br /><a href="https://github.com/ts-graphviz/ts-graphviz/issues?q=author%3AArtemAdamenko" title="Bug reports">🐛</a></td>
103
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/fredericohpandolfo"><img src="https://avatars.githubusercontent.com/u/24229136?v=4?s=100" width="100px;" alt="fredericohpandolfo"/><br /><sub><b>fredericohpandolfo</b></sub></a><br /><a href="https://github.com/ts-graphviz/ts-graphviz/issues?q=author%3Afredericohpandolfo" title="Bug reports">🐛</a></td>
104
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/diegoquinteiro"><img src="https://avatars.githubusercontent.com/u/1878108?v=4?s=100" width="100px;" alt="diegoquinteiro"/><br /><sub><b>diegoquinteiro</b></sub></a><br /><a href="https://github.com/ts-graphviz/ts-graphviz/issues?q=author%3Adiegoquinteiro" title="Bug reports">🐛</a></td>
105
+ </tr>
106
+ <tr>
107
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/robross0606"><img src="https://avatars.githubusercontent.com/u/2965467?v=4?s=100" width="100px;" alt="robross0606"/><br /><sub><b>robross0606</b></sub></a><br /><a href="#ideas-robross0606" title="Ideas, Planning, & Feedback">🤔</a></td>
108
+ <td align="center" valign="top" width="14.28%"><a href="https://blake-regalia.net"><img src="https://avatars.githubusercontent.com/u/1456400?v=4?s=100" width="100px;" alt="Blake Regalia"/><br /><sub><b>Blake Regalia</b></sub></a><br /><a href="https://github.com/ts-graphviz/ts-graphviz/issues?q=author%3Ablake-regalia" title="Bug reports">🐛</a></td>
109
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/bigbug"><img src="https://avatars.githubusercontent.com/u/27259?v=4?s=100" width="100px;" alt="bigbug"/><br /><sub><b>bigbug</b></sub></a><br /><a href="#question-bigbug" title="Answering Questions">💬</a></td>
110
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/murawakimitsuhiro"><img src="https://avatars.githubusercontent.com/u/13833242?v=4?s=100" width="100px;" alt="mrwk"/><br /><sub><b>mrwk</b></sub></a><br /><a href="#question-murawakimitsuhiro" title="Answering Questions">💬</a></td>
111
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/svdvonde"><img src="https://avatars.githubusercontent.com/u/2751783?v=4?s=100" width="100px;" alt="svdvonde"/><br /><sub><b>svdvonde</b></sub></a><br /><a href="#question-svdvonde" title="Answering Questions">💬</a></td>
112
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/seethroughdev"><img src="https://avatars.githubusercontent.com/u/203779?v=4?s=100" width="100px;" alt="Adam"/><br /><sub><b>Adam</b></sub></a><br /><a href="#question-seethroughdev" title="Answering Questions">💬</a></td>
113
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/trevor-scheer"><img src="https://avatars.githubusercontent.com/u/29644393?v=4?s=100" width="100px;" alt="Trevor Scheer"/><br /><sub><b>Trevor Scheer</b></sub></a><br /><a href="#a11y-trevor-scheer" title="Accessibility">️️️️♿️</a></td>
114
+ </tr>
115
+ <tr>
116
+ <td align="center" valign="top" width="14.28%"><a href="https://pre.ms"><img src="https://avatars.githubusercontent.com/u/238277?v=4?s=100" width="100px;" alt="Prem Pillai"/><br /><sub><b>Prem Pillai</b></sub></a><br /><a href="https://github.com/ts-graphviz/ts-graphviz/issues?q=author%3Acloud-on-prem" title="Bug reports">🐛</a></td>
117
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/nagasawaryoya"><img src="https://avatars.githubusercontent.com/u/53528726?v=4?s=100" width="100px;" alt="nagasawaryoya"/><br /><sub><b>nagasawaryoya</b></sub></a><br /><a href="https://github.com/ts-graphviz/ts-graphviz/commits?author=nagasawaryoya" title="Code">💻</a> <a href="https://github.com/ts-graphviz/ts-graphviz/commits?author=nagasawaryoya" title="Tests">⚠️</a></td>
118
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/tokidrill"><img src="https://avatars.githubusercontent.com/u/42460318?v=4?s=100" width="100px;" alt="YukiSasaki"/><br /><sub><b>YukiSasaki</b></sub></a><br /><a href="https://github.com/ts-graphviz/ts-graphviz/commits?author=tokidrill" title="Code">💻</a> <a href="https://github.com/ts-graphviz/ts-graphviz/commits?author=tokidrill" title="Tests">⚠️</a></td>
119
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/Madd0g"><img src="https://avatars.githubusercontent.com/u/1171003?v=4?s=100" width="100px;" alt="Madd0g"/><br /><sub><b>Madd0g</b></sub></a><br /><a href="https://github.com/ts-graphviz/ts-graphviz/issues?q=author%3AMadd0g" title="Bug reports">🐛</a></td>
120
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/j4k0xb"><img src="https://avatars.githubusercontent.com/u/55899582?v=4?s=100" width="100px;" alt="j4k0xb"/><br /><sub><b>j4k0xb</b></sub></a><br /><a href="https://github.com/ts-graphviz/ts-graphviz/issues?q=author%3Aj4k0xb" title="Bug reports">🐛</a></td>
121
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/haved"><img src="https://avatars.githubusercontent.com/u/3748845?v=4?s=100" width="100px;" alt="HKrogstie"/><br /><sub><b>HKrogstie</b></sub></a><br /><a href="https://github.com/ts-graphviz/ts-graphviz/issues?q=author%3Ahaved" title="Bug reports">🐛</a></td>
122
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/septatrix"><img src="https://avatars.githubusercontent.com/u/24257556?v=4?s=100" width="100px;" alt="Nils K"/><br /><sub><b>Nils K</b></sub></a><br /><a href="https://github.com/ts-graphviz/ts-graphviz/issues?q=author%3Aseptatrix" title="Bug reports">🐛</a></td>
123
+ </tr>
124
+ <tr>
125
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/hao2013"><img src="https://avatars.githubusercontent.com/u/67059492?v=4?s=100" width="100px;" alt="hao2013"/><br /><sub><b>hao2013</b></sub></a><br /><a href="#maintenance-hao2013" title="Maintenance">🚧</a> <a href="https://github.com/ts-graphviz/ts-graphviz/pulls?q=is%3Apr+reviewed-by%3Ahao2013" title="Reviewed Pull Requests">👀</a></td>
126
+ <td align="center" valign="top" width="14.28%"><a href="http://www.walterra.dev"><img src="https://avatars.githubusercontent.com/u/230104?v=4?s=100" width="100px;" alt="Walter Rafelsberger"/><br /><sub><b>Walter Rafelsberger</b></sub></a><br /><a href="#question-walterra" title="Answering Questions">💬</a></td>
127
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/grsjst"><img src="https://avatars.githubusercontent.com/u/4739018?v=4?s=100" width="100px;" alt="grsjst"/><br /><sub><b>grsjst</b></sub></a><br /><a href="https://github.com/ts-graphviz/ts-graphviz/issues?q=author%3Agrsjst" title="Bug reports">🐛</a></td>
128
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/stephenirven"><img src="https://avatars.githubusercontent.com/u/4293560?v=4?s=100" width="100px;" alt="Steve"/><br /><sub><b>Steve</b></sub></a><br /><a href="https://github.com/ts-graphviz/ts-graphviz/issues?q=author%3Astephenirven" title="Bug reports">🐛</a></td>
129
+ </tr>
130
+ </tbody>
131
+ </table>
132
+
133
+ <!-- markdownlint-restore -->
134
+ <!-- prettier-ignore-end -->
135
+
136
+ <!-- ALL-CONTRIBUTORS-LIST:END -->
137
+
138
+ This project follows the [all-contributors](https://github.com/all-contributors/all-contributors)
139
+ specification. Contributions of any kind welcome!
140
+
141
+ ## Changelog 📜
142
+
143
+ See [CHANGELOG.md](https://github.com/ts-graphviz/ts-graphviz/blob/main/packages/ast/CHANGELOG.md) for more details.
144
+
145
+ ## License ⚖️
146
+
147
+ This software is released under the MIT License, see [LICENSE](https://github.com/ts-graphviz/ts-graphviz/blob/main/LICENSE).
package/lib/ast.d.ts CHANGED
@@ -6,6 +6,7 @@ import { EdgeModel } from '@ts-graphviz/common';
6
6
  import { ModelsContext } from '@ts-graphviz/common';
7
7
  import { NodeModel } from '@ts-graphviz/common';
8
8
  import { RootGraphModel } from '@ts-graphviz/common';
9
+ import { StartRuleNames } from './_parse.js';
9
10
  import { SubgraphModel } from '@ts-graphviz/common';
10
11
 
11
12
  /**
@@ -759,7 +760,6 @@ export declare interface NodeRefGroupASTPropaties extends ASTCommonPropaties {
759
760
  * @param context PrintContext object
760
761
  * @param ast an ASTNode
761
762
  * @returns printed string
762
- * @memberof PrintPlugin
763
763
  */
764
764
  print(context: PrintContext, ast: T): Generator<string>;
765
765
  }
@@ -767,7 +767,7 @@ export declare interface NodeRefGroupASTPropaties extends ASTCommonPropaties {
767
767
  /**
768
768
  * @group Convert DOT to AST
769
769
  */
770
- export declare type Rule = 'Dot' | 'Graph' | 'Node' | 'Edge' | 'AttributeList' | 'Attribute' | 'Subgraph' | 'ClusterStatements';
770
+ export declare type Rule = StartRuleNames;
771
771
 
772
772
  /**
773
773
  * @group AST