@ts-graphviz/ast 2.0.7 → 3.0.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,163 @@
1
1
  # @ts-graphviz/ast
2
2
 
3
+ ## 3.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#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
8
+
9
+ Minimum required version is now Node.js 20+
10
+
11
+ ### ESM-Only Distribution
12
+
13
+ - **Remove CommonJS builds**: All packages now distribute only ESM (ECMAScript Modules)
14
+ - **Package exports**: Removed `require` fields from `package.json` exports
15
+ - **Module type**: All packages are now `"type": "module"`
16
+
17
+ ## 🔄 Migration Guide
18
+
19
+ ### For ESM Projects (Recommended)
20
+
21
+ ```json
22
+ {
23
+ "type": "module"
24
+ }
25
+ ```
26
+
27
+ ```typescript
28
+ // Import syntax remains unchanged
29
+ import { Digraph, Node, Edge, toDot } from "ts-graphviz";
30
+ import { toFile } from "ts-graphviz/adapter";
31
+ import { parse } from "ts-graphviz/ast";
32
+ ```
33
+
34
+ ### For CommonJS Projects
35
+
36
+ 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.
37
+
38
+ ### Before (CJS)
39
+
40
+ ```javascript
41
+ // JavaScript (CommonJS)
42
+ function createGraph() {
43
+ // Dynamic import is required because the packages no longer provide CommonJS builds.
44
+ const { Digraph, Node, Edge, toDot } = require("ts-graphviz");
45
+ const graph = new Digraph();
46
+ return toDot(graph);
47
+ }
48
+ ```
49
+
50
+ ### After (ESM)
51
+
52
+ ```javascript
53
+ async function createGraph() {
54
+ const { Digraph, Node, Edge, toDot } = await import("ts-graphviz");
55
+
56
+ const graph = new Digraph();
57
+ // Create your graph...
58
+ return toDot(graph);
59
+ }
60
+ ```
61
+
62
+ ```typescript
63
+ // TypeScript (CommonJS)
64
+ // Update tsconfig.json
65
+ {
66
+ "compilerOptions": {
67
+ "module": "Node16",
68
+ "moduleResolution": "Node16"
69
+ }
70
+ }
71
+
72
+ // Use dynamic imports
73
+ async function createGraph() {
74
+ const tsGraphviz = await import('ts-graphviz');
75
+ const { Digraph, Node, Edge, toDot } = tsGraphviz;
76
+
77
+ const graph = new Digraph();
78
+ // Create your graph...
79
+ return toDot(graph);
80
+ }
81
+ ```
82
+
83
+ ## 🎯 Benefits
84
+
85
+ - **Modern JavaScript**: Leveraging native ES modules for better performance
86
+ - **Smaller bundle sizes**: ESM enables better tree-shaking
87
+ - **Future-proof**: Aligning with the JavaScript ecosystem direction
88
+ - **Better TypeScript support**: Enhanced module resolution
89
+
90
+ - [#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
91
+
92
+ Improves the handling of HTML-like labels in the `fromDot` and `toDot` functions to ensure valid Dot output.
93
+
94
+ ### Minor Changes
95
+
96
+ - [#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
97
+
98
+ To provide clarity on the environments in which ts-graphviz operates, we have categorized support levels:
99
+
100
+ ## Support Levels
101
+
102
+ ### Tier 1: Full Support
103
+
104
+ - **Definition**: Environments that are fully supported, with comprehensive automated testing and maintenance.
105
+ - **Environments**:
106
+ - **Node.js LTS versions**: All active Long-Term Support (LTS) versions.
107
+ - If a Node.js LTS version is released, we will ensure compatibility with it.
108
+ - If a Node.js LTS version is deprecated, we will drop support for it in the next major release.
109
+ - **Details**:
110
+ - We run automated tests on all LTS versions of Node.js.
111
+ - Full compatibility and performance are ensured.
112
+ - Critical issues are prioritized for fixes.
113
+
114
+ ### Tier 2: Active Support
115
+
116
+ - **Definition**: Environments that receive active support with limited automated testing.
117
+ - **Environments**:
118
+ - **Deno Latest LTS version**: The latest Long-Term Support (LTS) version of Deno.
119
+ - If a new Deno LTS version is released, we will ensure compatibility with it.
120
+ - If a Deno LTS version is deprecated, we will drop support for it in the next minor release.
121
+ - **Node.js Current Release**: The latest Node.js release outside the LTS schedule.
122
+ - If a new Node.js current release is available, we will ensure compatibility with it.
123
+ - If a Node.js current release is deprecated, we will drop support for it in the next minor release.
124
+ - **Details**:
125
+ - Compatibility is maintained, and issues are addressed.
126
+
127
+ ### Tier 3: Community Support
128
+
129
+ - **Definition**: Environments that are not officially tested but are supported on a best-effort basis.
130
+ - **Environments**:
131
+ - **Modern Browsers**: Latest versions of major browsers, including:
132
+ - Google Chrome
133
+ - Mozilla Firefox
134
+ - Microsoft Edge
135
+ - Apple Safari
136
+ - **Deno Current Release**: The latest Deno release outside the LTS schedule.
137
+ - **Details**:
138
+ - Installation methods are provided.
139
+ - No automated testing is performed.
140
+ - Issues reported by users will be addressed.
141
+ - Targeting the latest versions ensures compatibility with modern web standards.
142
+ - We will not actively test or maintain compatibility with older versions of browsers.
143
+
144
+ ### Patch Changes
145
+
146
+ - [#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
147
+
148
+ - Drop turbo
149
+ - Upgrade biome to 2.0
150
+ - Upgrade TypeScript to 5.8
151
+ - Upgrade Vite to 7.0
152
+ - Upgrade Vitest to 3.2
153
+ - Upgrade Peggy to 5.0 and drop ts-pegjs
154
+ - Implement new E2E test workflow
155
+
156
+ - [#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
157
+
158
+ - 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)]:
159
+ - @ts-graphviz/common@3.0.0
160
+
3
161
  ## 2.0.7
4
162
 
5
163
  ### 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