@oh-just-another/importers 0.57.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 +14 -0
- package/LICENSE +21 -0
- package/README.md +76 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/dot.d.ts +19 -0
- package/dist/dot.d.ts.map +1 -0
- package/dist/dot.js +246 -0
- package/dist/dot.js.map +1 -0
- package/dist/drawio.d.ts +19 -0
- package/dist/drawio.d.ts.map +1 -0
- package/dist/drawio.js +121 -0
- package/dist/drawio.js.map +1 -0
- package/dist/graph.d.ts +40 -0
- package/dist/graph.d.ts.map +1 -0
- package/dist/graph.js +2 -0
- package/dist/graph.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/layout.d.ts +22 -0
- package/dist/layout.d.ts.map +1 -0
- package/dist/layout.js +78 -0
- package/dist/layout.js.map +1 -0
- package/dist/mermaid.d.ts +22 -0
- package/dist/mermaid.d.ts.map +1 -0
- package/dist/mermaid.js +131 -0
- package/dist/mermaid.js.map +1 -0
- package/dist/to-scene.d.ts +12 -0
- package/dist/to-scene.d.ts.map +1 -0
- package/dist/to-scene.js +146 -0
- package/dist/to-scene.js.map +1 -0
- package/package.json +55 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# @oh-just-another/importers
|
|
2
|
+
|
|
3
|
+
## 0.57.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Version bump just for publishing.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @oh-just-another/scene@0.57.0
|
|
13
|
+
- @oh-just-another/tokens@0.57.0
|
|
14
|
+
- @oh-just-another/types@0.57.0
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Rustam Garifulin
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# @oh-just-another/importers
|
|
2
|
+
|
|
3
|
+
Convert popular diagram source formats into `@oh-just-another/scene` documents:
|
|
4
|
+
|
|
5
|
+
- **Mermaid flowchart** — `flowchart TD … A[Start] --> B{Decide}`
|
|
6
|
+
- **Graphviz dot** — `digraph G { a -> b }`
|
|
7
|
+
- **drawio XML** — the uncompressed `<mxGraphModel>` payload
|
|
8
|
+
|
|
9
|
+
Layout for graphs without explicit coordinates is computed by `@dagrejs/dagre`. drawio files keep their original positions and skip layout entirely.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pnpm add @oh-just-another/importers
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
`@dagrejs/dagre` is a direct dependency (pure JS, ~80 KB).
|
|
18
|
+
|
|
19
|
+
## Quick start
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import { writeFile, readFile } from "node:fs/promises";
|
|
23
|
+
import { importMermaid } from "@oh-just-another/importers";
|
|
24
|
+
import { stringifyScene } from "@oh-just-another/serialization";
|
|
25
|
+
|
|
26
|
+
const src = await readFile("flow.mmd", "utf8");
|
|
27
|
+
const scene = importMermaid(src);
|
|
28
|
+
await writeFile("scene.json", stringifyScene(scene, 2));
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
For other formats use `importDot` / `importDrawio`. If you need the intermediate `GraphDocument` (e.g. to inspect or transform nodes/edges before materialising), call `parseMermaid` / `parseDot` / `parseDrawio` followed by `graphToScene`.
|
|
32
|
+
|
|
33
|
+
## API
|
|
34
|
+
|
|
35
|
+
| Name | Purpose |
|
|
36
|
+
| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
|
|
37
|
+
| `parseMermaid(source)` | Mermaid → `GraphDocument`. |
|
|
38
|
+
| `parseDot(source)` | Graphviz dot → `GraphDocument`. |
|
|
39
|
+
| `parseDrawio(source)` | drawio XML → `GraphDocument` (positions preserved). |
|
|
40
|
+
| `graphToScene(graph)` | Layout (via dagre) + materialise into `Scene`. Skips layout if every node already has a `position`. |
|
|
41
|
+
| `importMermaid` / `importDot` / `importDrawio` | Convenience one-shots: parse + `graphToScene` in one call. |
|
|
42
|
+
| `layoutGraph(graph)` | Standalone layout step — returns nodes with `position`/`width`/`height` filled in. |
|
|
43
|
+
| `GraphDocument`, `GraphNode`, `GraphEdge`, `NodeShape`, `EdgeDirection`, `GraphLayoutDirection`, `LayoutedNode` | Public types. |
|
|
44
|
+
|
|
45
|
+
## Supported feature subsets
|
|
46
|
+
|
|
47
|
+
### Mermaid flowchart
|
|
48
|
+
|
|
49
|
+
- Direction headers: `flowchart TD` / `TB` / `BT` / `LR` / `RL`; `graph` alias.
|
|
50
|
+
- Node bracket shapes: `A`, `A[Label]`, `A(Round)`, `A((Circle))`, `A{Decision}`.
|
|
51
|
+
- Edges: `-->` (directed), `---` (undirected), `-->|label|` (labelled), chained: `A --> B --> C`.
|
|
52
|
+
- Comments (`%%`), `class` / `classDef` / `style` / `subgraph` — silently ignored.
|
|
53
|
+
|
|
54
|
+
### Graphviz dot
|
|
55
|
+
|
|
56
|
+
- `digraph` / `graph`, `strict` modifier.
|
|
57
|
+
- `rankdir=TB/BT/LR/RL`.
|
|
58
|
+
- Edges: `a -> b` (directed) / `a -- b` (undirected). Chains allowed.
|
|
59
|
+
- Node attrs: `label`, `shape` (box/rect/rectangle/ellipse/oval/circle/diamond), `fillcolor`, `color`.
|
|
60
|
+
- Edge attrs: `label`.
|
|
61
|
+
- Comments: `//`, `/* … */`, leading `#`.
|
|
62
|
+
|
|
63
|
+
### drawio XML
|
|
64
|
+
|
|
65
|
+
- `<mxCell vertex="1" value="..." style="...">` + `<mxGeometry x y width height>`.
|
|
66
|
+
- `<mxCell edge="1" source="..." target="..." value="...">` (label decoded from HTML entities).
|
|
67
|
+
- Shape inferred from `style`: `ellipse`, `rhombus`/`diamond`, `rounded=1` → round, else rectangle.
|
|
68
|
+
- Subgraphs, groups, swimlanes, custom mxgraph shapes, splines, fonts — **not** supported.
|
|
69
|
+
|
|
70
|
+
## Design notes
|
|
71
|
+
|
|
72
|
+
- **Two-stage pipeline (parser → `GraphDocument` → `graphToScene`)**. Lets hosts mutate the intermediate model: rename nodes, override shapes, pre-assign colours from a theme, etc. Without this split each importer would have to know about scene internals.
|
|
73
|
+
- **dagre for layout**, not WebCola or ELK. Compact (~80 KB), pure JS, no DOM. The trade-off is that orthogonal/spline edge routing isn't available — we emit straight connectors and let the renderer draw them.
|
|
74
|
+
- **drawio skips layout entirely** when every node has a `position` — there's no point relaying-out a hand-crafted diagram.
|
|
75
|
+
- **Per-format parsers are hand-rolled** (no `mermaid` / `pegjs-dot` / `xmldom` deps). The supported subset is intentionally minimal — hosts needing full fidelity can pre-process with the official tool and hand the output to us as a `GraphDocument`.
|
|
76
|
+
- **Each node spawns two elements** (the geometry + a centered text label), not a single composite "labelled node". Keeps `BuiltinElement` open-element semantics intact — labels are normal `text` elements hosts can move / edit independently.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"fileNames":["../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../src/graph.ts","../src/dot.ts","../src/drawio.ts","../../types/dist/vec2.d.ts","../../types/dist/bounds.d.ts","../../types/dist/transform.d.ts","../../types/dist/color.d.ts","../../types/dist/ids.d.ts","../../types/dist/events.d.ts","../../types/dist/index.d.ts","../../scene/dist/style.d.ts","../../scene/dist/constants.d.ts","../../../node_modules/.pnpm/fractional-keys@0.1.1/node_modules/fractional-keys/dist/types.d.ts","../../../node_modules/.pnpm/fractional-keys@0.1.1/node_modules/fractional-keys/dist/generate.d.ts","../../../node_modules/.pnpm/fractional-keys@0.1.1/node_modules/fractional-keys/dist/jitter.d.ts","../../../node_modules/.pnpm/fractional-keys@0.1.1/node_modules/fractional-keys/dist/digits.d.ts","../../../node_modules/.pnpm/fractional-keys@0.1.1/node_modules/fractional-keys/dist/errors.d.ts","../../../node_modules/.pnpm/fractional-keys@0.1.1/node_modules/fractional-keys/dist/index.d.ts","../../scene/dist/edge.d.ts","../../scene/dist/shape.d.ts","../../scene/dist/edge-curve.d.ts","../../scene/dist/annotation.d.ts","../../scene/dist/file.d.ts","../../scene/dist/layer.d.ts","../../scene/dist/viewport.d.ts","../../scene/dist/patch.d.ts","../../scene/dist/scene.d.ts","../../scene/dist/edge-geometry.d.ts","../../scene/dist/operations.d.ts","../../scene/dist/render-bounds.d.ts","../../scene/dist/text-measure.d.ts","../../scene/dist/anchors.d.ts","../../scene/dist/snap.d.ts","../../scene/dist/outline.d.ts","../../scene/dist/annotation-geometry.d.ts","../../scene/dist/spatial.d.ts","../../scene/dist/queries.d.ts","../../scene/dist/a11y.d.ts","../../scene/dist/layout.d.ts","../../scene/dist/layout-registry.d.ts","../../scene/dist/elbow-router.d.ts","../../scene/dist/elbow-link.d.ts","../../scene/dist/heading.d.ts","../../scene/dist/diff.d.ts","../../scene/dist/three-way-merge.d.ts","../../scene/dist/container.d.ts","../../scene/dist/index.d.ts","../src/mermaid.ts","../../tokens/dist/colors.d.ts","../../tokens/dist/index.d.ts","../../../node_modules/.pnpm/@dagrejs+dagre@1.1.8/node_modules/@dagrejs/dagre/index.d.ts","../src/layout.ts","../src/to-scene.ts","../src/index.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/globals.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/web-globals/domexception.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/web-globals/events.d.ts","../../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/header.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/readable.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/file.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/fetch.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/formdata.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/connector.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/client.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/errors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-origin.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool-stats.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/handlers.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-client.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-errors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-handler.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/api.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/interceptors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/util.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cookies.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/patch.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/websocket.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/eventsource.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/filereader.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/content-type.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cache.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/index.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/web-globals/fetch.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/web-globals/navigator.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/web-globals/storage.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/assert.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/buffer.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/child_process.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/cluster.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/console.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/constants.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/crypto.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/dgram.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/dns.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/domain.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/events.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/fs.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/http.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/http2.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/https.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/inspector.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/inspector.generated.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/module.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/net.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/os.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/path.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/process.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/punycode.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/querystring.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/readline.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/readline/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/repl.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/sea.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/sqlite.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/stream.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/stream/web.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/test.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/timers.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/tls.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/tty.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/url.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/v8.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/vm.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/wasi.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/zlib.d.ts","../../../node_modules/.pnpm/@types+node@22.19.19/node_modules/@types/node/index.d.ts"],"fileIdsList":[[117,166,183,184],[117,163,164,166,183,184],[117,165,166,183,184],[166,183,184],[117,166,171,183,184,201],[117,166,167,172,177,183,184,186,198,209],[117,166,167,168,177,183,184,186],[112,113,114,117,166,183,184],[117,166,169,183,184,210],[117,166,170,171,178,183,184,187],[117,166,171,183,184,198,206],[117,166,172,174,177,183,184,186],[117,165,166,173,183,184],[117,166,174,175,183,184],[117,166,176,177,183,184],[117,165,166,177,183,184],[117,166,177,178,179,183,184,198,209],[117,166,177,178,179,183,184,193,198,201],[117,159,166,174,177,180,183,184,186,198,209],[117,166,177,178,180,181,183,184,186,198,206,209],[117,166,180,182,183,184,198,206,209],[115,116,117,118,119,120,121,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215],[117,166,177,183,184],[117,166,183,184,185,209],[117,166,174,177,183,184,186,198],[117,166,183,184,187],[117,166,183,184,188],[117,165,166,183,184,189],[117,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215],[117,166,183,184,191],[117,166,183,184,192],[117,166,177,183,184,193,194],[117,166,183,184,193,195,210,212],[117,166,178,183,184],[117,166,177,183,184,198,199,201],[117,166,183,184,200,201],[117,166,183,184,198,199],[117,166,183,184,201],[117,166,183,184,202],[117,163,166,183,184,198,203,209],[117,166,177,183,184,204,205],[117,166,183,184,204,205],[117,166,171,183,184,186,198,206],[117,166,183,184,207],[117,166,183,184,186,208],[117,166,180,183,184,192,209],[117,166,171,183,184,210],[117,166,183,184,198,211],[117,166,183,184,185,212],[117,166,183,184,213],[117,159,166,183,184],[117,159,166,177,179,183,184,189,198,201,209,211,212,214],[117,166,183,184,198,215],[70,117,166,183,184],[70,71,72,73,74,117,166,183,184],[117,131,135,166,183,184,209],[117,131,166,183,184,198,209],[117,126,166,183,184],[117,128,131,166,183,184,206,209],[117,166,183,184,186,206],[117,166,183,184,216],[117,126,166,183,184,216],[117,128,131,166,183,184,186,209],[117,123,124,127,130,166,177,183,184,198,209],[117,131,138,166,183,184],[117,123,129,166,183,184],[117,131,152,153,166,183,184],[117,127,131,166,183,184,201,209,216],[117,152,166,183,184,216],[117,125,126,166,183,184,216],[117,131,166,183,184],[117,125,126,127,128,129,130,131,132,133,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,153,154,155,156,157,158,166,183,184],[117,131,146,166,183,184],[117,131,138,139,166,183,184],[117,129,131,139,140,166,183,184],[117,130,166,183,184],[117,123,126,131,166,183,184],[117,131,135,139,140,166,183,184],[117,135,166,183,184],[117,129,131,134,166,183,184,209],[117,123,128,131,138,166,183,184],[117,166,183,184,198],[117,126,131,152,166,183,184,214,216],[58,117,166,183,184],[58,59,60,104,105,109,110,117,166,183,184],[58,108,117,166,183,184],[58,67,104,107,109,117,166,183,184],[77,117,166,183,184],[67,76,77,117,166,183,184],[67,79,84,117,166,183,184],[67,117,166,183,184],[67,77,84,117,166,183,184],[67,84,117,166,183,184],[67,76,78,84,117,166,183,184],[67,68,75,117,166,183,184],[67,76,84,117,166,183,184],[67,77,117,166,183,184],[68,69,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,117,166,183,184],[67,75,117,166,183,184],[67,83,84,117,166,183,184],[67,77,83,84,117,166,183,184],[67,76,77,79,81,82,83,84,117,166,183,184],[67,76,77,79,80,81,82,117,166,183,184],[67,76,77,81,84,93,117,166,183,184],[67,75,76,77,79,80,81,82,83,117,166,183,184],[67,68,75,76,117,166,183,184],[106,117,166,183,184],[61,117,166,183,184],[61,62,63,64,65,66,117,166,183,184]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"5c0ab7d20fa0ad8f132f95d7a906c2532bed5a03ef4b9cdb19476980151069ee","signature":"0890b6871a7faebf8de96cb942478db331bef1cb8b915a43a1a10fb8cdd38f0d"},{"version":"2eac0d49e534a2895b215171721f64f7e639557d65732468970800daeba81adf","signature":"07470890b851db6998785cf5bec3698b6dd0c42c5618efa141d9fb7d6c6fd9b0"},{"version":"2a722bd686421190c7c5200ca530d482767b9857c7c7f9bec14b269960f35a5f","signature":"8fb30cc726264f2f54d8426cae4726dc474d844e2acac42ad2c47312806ee59a"},"a9dc2e59fb40b94411bd995a0013c15385b99599a18b7141cf3eafd80c7f0f96","4015dc819b09b93f989d4df8f1f0f36cb99cb2aad8102ab8b4b27fb6020beb5f","ed06a7b359e2125c375f6bada6631fd038473dd624309b8a43a824693a6f6c89","46fa0b276ad58dc963c574f72bb9456b881f3d61bc0fe6827c24f3f02baa6038","1f0260dbafda11af88b11f1b6d662ee45517d44c8cc9a7248bd61d2d8ab1f880","502657b9a54e290098ba4f955efa476b91648b24d5310b8c6e7aa0d4cf8945ae","90755de39a18e2894ad3cced6cdf4cb670e09868b01a6f6465af558d865bf848","b8e3c1f3a85e05bcbc56fa28558cffc68ac40e4158afdc2d702ea825ce21d14d","c196961c4aa13e3bf28a7e56ac7fa0b0cbfc668eca4496292d629dd18f43296b",{"version":"bce89d3ef847715b91ffd525a157c779be8fafebe823671815f7ce96f27afcda","impliedFormat":99},{"version":"c67f9d85070618f586d632cf184b986eb604f426b90aa68ecdad1ac68ca3151c","impliedFormat":99},{"version":"c656cc6ded557aff87a6c823142852e3548c6a14f84bb48ee35c3e57b6ebc03b","impliedFormat":99},{"version":"0e34130243c29d8d826f868c4e00ff586b349627cb241b3d89f0459a6cdeff4d","impliedFormat":99},{"version":"d555c6cb465cc5cf8127adbbc496720d5200c9dfafa777bbf9dfdea74ebfe3a3","impliedFormat":99},{"version":"27a6936a863edf777150af3ebc65939fa34f51d68385f8a7f198d8ea53685a4d","impliedFormat":99},"17ee722c53770caad5479081a3db9f0df8135a8f061ea9ce57a507ca0c424cce","78bde316dcb094df77d06b893e0b965d318ac5708d09e7cf6206931263be32e6","d081374b0bf74e2748138e8b0a56458e12e2ee7bd07fb239b92c97a33bba8d70","b85f83aa4b7fb1abc375a73cb706295a146b9f22cf9fa5ec89105fcff6ea1495","fd0cd0a179e95f7d4d5f7370209f6b413006242a045137d33ca230ae015ba760","fa716666e5bedc99e38d37def5182924b9dd9e6298c2751f8cebe0fc631ef697","48280d2635c39dd226b7e5bb71d0519f355b60d4d92e9f6b5b4a427aa28412f8","8bdcd8a58fead736e81808193884907482c8d354f13a0516e9b236a07622c727","8ebfa15cb2e79b885a21ae5f92507b5b9dd9b01041143554903c163f86611849","4233c4d8ac9cb79b3b71e4923eb486f08f5f2c6508fc177192081a402bee38b3","dfa88df7638cc24634255691d0a3fb72a4910b73211da89fab8f2362730cb3b2","75ea946ee4d31489f494b0def56b2db669c3aac052713387d6edc51dc2ca86db","26ce9aa6f798212e39770c45142239f3a54fa63697ba90bae90c6d7ac7da825a","eceda86937454d399a4e4cd4a3e25835a4ac80ab930f399b20f53d8f1c772457","8b12bcaa49f76ee1ce7f77943a297078dba53abedd344da6d370012eab482c07","ebfed381c5296dbb1ebae8265ca08dbce33929fa829f6ac11f2f591beb1f4485","ae557ba7a3d28e8909ac395365eb5f8ff63bc28eb2eaace61650ed51f1bc1808","95784f449b26dbdf4aadd2f99a5c2f6c419d80f993ececa6c0c3e0159b452aa5","89c0f7c64772fcb38eda1e15b26da3e53e4101c968a0eeb14954f154aee4dac1","6e7e44d7615d2899c2dd6be4e15bbb2cd0b7f4afec2379c08db14b9eac5c9b43","a1f5b4a129cd4b8f013533f200baf74615d690c41f1ef2147bd40ef6110c4a1b","d1b901b618ec72bff0fcb657edf03d83e2bcbb2687a9cddadea48a24ab23faf2","9a02cb3cccc3eeb3fea9327c47dbda2076e21f3da7b2eb659871dc91b8572f42","1778dfd35a7d5885896c436792662c8d602ea8cf03aeed97b0381b6e82c4e980","f730ff4577c8d45cb4a587d078ee5b692613c3de57f26a27a4be74c183adc226","60bd456f1b63861f880c386ddf1b3916098bbafbf4b5a46a5e5ebc4fcb9434c4","f2c0b5b634eed4010d9396710281a7fdc7019fe47507e8bcb706a58af985548a","baeb8f9be968778478ffa26099ec4211dd28c6dea1633fd8fd1560c34fdd0269","5df76ca2d799039334a825b621129061b89022808e0943397e045bc6feec894c",{"version":"a6711d69b8ad092398c5f73d9ab41c766602e7d6c9efe300efd069d490a8a8b2","signature":"72beafce8bca2755fc974d15f546867e0e94699d9473f0d1404a5dd80e9ac17c"},"e4d2b2c520be2f19c8d77c613a2d0ecffb8524de9cca62d05a6622c7411c862f","88c64647ff7195c3bb01b2bcd932e5f181302a42068d991067f6ea15c802aa5d",{"version":"5778a0658cd8e16cc05e4674d5ec32b948d85637fde35c499ea64a0322f7f43b","impliedFormat":1},{"version":"53216e14de6be80ad2c37062c8ad0b9aaf5b4fabb9d65c62e4cd2b6564aad39f","signature":"357c07cbc040fcc3cc552099458442a41a59a4ba3917c731f6f5e5fbf4d55225"},{"version":"4dd51185210922c71dc7cede54123109ba435a8a3b45a16cc541d54dc5c8bcb6","signature":"79921dc17ad040494b2b03189e49ec663db0ef933e4d8f93e7472bbb8b197a67"},{"version":"b7574cd4a8aa92177bd18cafa34231d034ad985dfb7daf39c92a7c43e0010f00","signature":"fb4055dee29d5346d935e54326f4fc2601ffaad4e031a018647b1f4124087096"},{"version":"6c7176368037af28cb72f2392010fa1cef295d6d6744bca8cfb54985f3a18c3e","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"437e20f2ba32abaeb7985e0afe0002de1917bc74e949ba585e49feba65da6ca1","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"98cffbf06d6bab333473c70a893770dbe990783904002c4f1a960447b4b53dca","affectsGlobalScope":true,"impliedFormat":1},{"version":"3af97acf03cc97de58a3a4bc91f8f616408099bc4233f6d0852e72a8ffb91ac9","affectsGlobalScope":true,"impliedFormat":1},{"version":"808069bba06b6768b62fd22429b53362e7af342da4a236ed2d2e1c89fcca3b4a","affectsGlobalScope":true,"impliedFormat":1},{"version":"1db0b7dca579049ca4193d034d835f6bfe73096c73663e5ef9a0b5779939f3d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"9798340ffb0d067d69b1ae5b32faa17ab31b82466a3fc00d8f2f2df0c8554aaa","affectsGlobalScope":true,"impliedFormat":1},{"version":"f26b11d8d8e4b8028f1c7d618b22274c892e4b0ef5b3678a8ccbad85419aef43","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"763fe0f42b3d79b440a9b6e51e9ba3f3f91352469c1e4b3b67bfa4ff6352f3f4","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"7f182617db458e98fc18dfb272d40aa2fff3a353c44a89b2c0ccb3937709bfb5","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"b52476feb4a0cbcb25e5931b930fc73cb6643fb1a5060bf8a3dda0eeae5b4b68","affectsGlobalScope":true,"impliedFormat":1},{"version":"f9501cc13ce624c72b61f12b3963e84fad210fbdf0ffbc4590e08460a3f04eba","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7721c4f69f93c91360c26a0a84ee885997d748237ef78ef665b153e622b36c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0fa06ada475b910e2106c98c68b10483dc8811d0c14a8a8dd36efb2672485b29","impliedFormat":1},{"version":"33e5e9aba62c3193d10d1d33ae1fa75c46a1171cf76fef750777377d53b0303f","impliedFormat":1},{"version":"2b06b93fd01bcd49d1a6bd1f9b65ddcae6480b9a86e9061634d6f8e354c1468f","impliedFormat":1},{"version":"6a0cd27e5dc2cfbe039e731cf879d12b0e2dded06d1b1dedad07f7712de0d7f4","affectsGlobalScope":true,"impliedFormat":1},{"version":"13f5c844119c43e51ce777c509267f14d6aaf31eafb2c2b002ca35584cd13b29","impliedFormat":1},{"version":"e60477649d6ad21542bd2dc7e3d9ff6853d0797ba9f689ba2f6653818999c264","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"4c829ab315f57c5442c6667b53769975acbf92003a66aef19bce151987675bd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"b2ade7657e2db96d18315694789eff2ddd3d8aea7215b181f8a0b303277cc579","impliedFormat":1},{"version":"9855e02d837744303391e5623a531734443a5f8e6e8755e018c41d63ad797db2","impliedFormat":1},{"version":"4d631b81fa2f07a0e63a9a143d6a82c25c5f051298651a9b69176ba28930756d","impliedFormat":1},{"version":"836a356aae992ff3c28a0212e3eabcb76dd4b0cc06bcb9607aeef560661b860d","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"41670ee38943d9cbb4924e436f56fc19ee94232bc96108562de1a734af20dc2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"c906fb15bd2aabc9ed1e3f44eb6a8661199d6c320b3aa196b826121552cb3695","impliedFormat":1},{"version":"22295e8103f1d6d8ea4b5d6211e43421fe4564e34d0dd8e09e520e452d89e659","impliedFormat":1},{"version":"58647d85d0f722a1ce9de50955df60a7489f0593bf1a7015521efe901c06d770","impliedFormat":1},{"version":"73b5fa37db36eeac90c4d752e39586f1b57187400c4f5280fd05f16437287a45","impliedFormat":1},{"version":"a10f0e1854f3316d7ee437b79649e5a6ae3ae14ffe6322b02d4987071a95362e","impliedFormat":1},{"version":"e208f73ef6a980104304b0d2ca5f6bf1b85de6009d2c7e404028b875020fa8f2","impliedFormat":1},{"version":"d163b6bc2372b4f07260747cbc6c0a6405ab3fbcea3852305e98ac43ca59f5bc","impliedFormat":1},{"version":"e6fa9ad47c5f71ff733744a029d1dc472c618de53804eae08ffc243b936f87ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6f137d651076822d4fe884287e68fd61785a0d3d1fdb250a5059b691fa897db","impliedFormat":1},{"version":"24826ed94a78d5c64bd857570fdbd96229ad41b5cb654c08d75a9845e3ab7dde","impliedFormat":1},{"version":"8b479a130ccb62e98f11f136d3ac80f2984fdc07616516d29881f3061f2dd472","impliedFormat":1},{"version":"928af3d90454bf656a52a48679f199f64c1435247d6189d1caf4c68f2eaf921f","affectsGlobalScope":true,"impliedFormat":1},{"version":"bceb58df66ab8fb00170df20cd813978c5ab84be1d285710c4eb005d8e9d8efb","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"933921f0bb0ec12ef45d1062a1fc0f27635318f4d294e4d99de9a5493e618ca2","impliedFormat":1},{"version":"71a0f3ad612c123b57239a7749770017ecfe6b66411488000aba83e4546fde25","impliedFormat":1},{"version":"77fbe5eecb6fac4b6242bbf6eebfc43e98ce5ccba8fa44e0ef6a95c945ff4d98","impliedFormat":1},{"version":"4f9d8ca0c417b67b69eeb54c7ca1bedd7b56034bb9bfd27c5d4f3bc4692daca7","impliedFormat":1},{"version":"814118df420c4e38fe5ae1b9a3bafb6e9c2aa40838e528cde908381867be6466","impliedFormat":1},{"version":"a3fc63c0d7b031693f665f5494412ba4b551fe644ededccc0ab5922401079c95","impliedFormat":1},{"version":"80523c00b8544a2000ae0143e4a90a00b47f99823eb7926c1e03c494216fc363","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"45650f47bfb376c8a8ed39d4bcda5902ab899a3150029684ee4c10676d9fbaee","impliedFormat":1},{"version":"746911b62b329587939560deb5c036aca48aece03147b021fa680223255d5183","affectsGlobalScope":true,"impliedFormat":1},{"version":"18fd40412d102c5564136f29735e5d1c3b455b8a37f920da79561f1fde068208","impliedFormat":1},{"version":"c8d3e5a18ba35629954e48c4cc8f11dc88224650067a172685c736b27a34a4dc","impliedFormat":1},{"version":"f0be1b8078cd549d91f37c30c222c2a187ac1cf981d994fb476a1adc61387b14","affectsGlobalScope":true,"impliedFormat":1},{"version":"0aaed1d72199b01234152f7a60046bc947f1f37d78d182e9ae09c4289e06a592","impliedFormat":1},{"version":"2b55d426ff2b9087485e52ac4bc7cfafe1dc420fc76dad926cd46526567c501a","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"5b7aa3c4c1a5d81b411e8cb302b45507fea9358d3569196b27eb1a27ae3a90ef","affectsGlobalScope":true,"impliedFormat":1},{"version":"5987a903da92c7462e0b35704ce7da94d7fdc4b89a984871c0e2b87a8aae9e69","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea08a0345023ade2b47fbff5a76d0d0ed8bff10bc9d22b83f40858a8e941501c","impliedFormat":1},{"version":"47613031a5a31510831304405af561b0ffaedb734437c595256bb61a90f9311b","impliedFormat":1},{"version":"ae062ce7d9510060c5d7e7952ae379224fb3f8f2dd74e88959878af2057c143b","impliedFormat":1},{"version":"8a1a0d0a4a06a8d278947fcb66bf684f117bf147f89b06e50662d79a53be3e9f","affectsGlobalScope":true,"impliedFormat":1},{"version":"358765d5ea8afd285d4fd1532e78b88273f18cb3f87403a9b16fef61ac9fdcfe","impliedFormat":1},{"version":"9f55299850d4f0921e79b6bf344b47c420ce0f507b9dcf593e532b09ea7eeea1","impliedFormat":1}],"root":[[58,60],105,[109,111]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"exactOptionalPropertyTypes":true,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitOverride":true,"noPropertyAccessFromIndexSignature":false,"noUncheckedIndexedAccess":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":9,"tsBuildInfoFile":"./.tsbuildinfo","verbatimModuleSyntax":true},"referencedMap":[[108,1],[163,2],[164,2],[165,3],[117,4],[166,5],[167,6],[168,7],[112,1],[115,8],[113,1],[114,1],[169,9],[170,10],[171,11],[172,12],[173,13],[174,14],[175,14],[176,15],[177,16],[178,17],[179,18],[118,1],[116,1],[180,19],[181,20],[182,21],[216,22],[183,23],[184,1],[185,24],[186,25],[187,26],[188,27],[189,28],[190,29],[191,30],[192,31],[193,32],[194,32],[195,33],[196,1],[197,34],[198,35],[200,36],[199,37],[201,38],[202,39],[203,40],[204,41],[205,42],[206,43],[207,44],[208,45],[209,46],[210,47],[211,48],[212,49],[213,50],[119,1],[120,1],[121,1],[160,51],[161,1],[162,1],[214,52],[215,53],[122,1],[73,1],[74,1],[71,54],[75,55],[72,54],[70,1],[56,1],[57,1],[11,1],[10,1],[2,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[3,1],[20,1],[21,1],[4,1],[22,1],[26,1],[23,1],[24,1],[25,1],[27,1],[28,1],[29,1],[5,1],[30,1],[31,1],[32,1],[33,1],[6,1],[37,1],[34,1],[35,1],[36,1],[38,1],[7,1],[39,1],[44,1],[45,1],[40,1],[41,1],[42,1],[43,1],[8,1],[49,1],[46,1],[47,1],[48,1],[50,1],[9,1],[51,1],[52,1],[53,1],[55,1],[54,1],[1,1],[138,56],[148,57],[137,56],[158,58],[129,59],[128,60],[157,61],[151,62],[156,63],[131,64],[145,65],[130,66],[154,67],[126,68],[125,61],[155,69],[127,70],[132,71],[133,1],[136,71],[123,1],[159,72],[149,73],[140,74],[141,75],[143,76],[139,77],[142,78],[152,61],[134,79],[135,80],[144,81],[124,82],[147,73],[146,71],[150,1],[153,83],[59,84],[60,84],[58,1],[111,85],[109,86],[105,84],[110,87],[95,88],[89,89],[92,90],[79,91],[69,1],[103,92],[101,93],[78,91],[85,94],[76,95],[99,96],[98,91],[80,91],[100,97],[104,98],[81,99],[97,100],[96,101],[86,102],[91,97],[83,103],[94,104],[87,97],[84,105],[77,106],[90,93],[93,91],[68,91],[88,1],[102,92],[82,91],[106,1],[107,107],[62,1],[64,1],[66,108],[65,1],[67,109],[63,1],[61,1]],"latestChangedDtsFile":"./index.d.ts","version":"5.9.3"}
|
package/dist/dot.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { GraphDocument } from "./graph.js";
|
|
2
|
+
/**
|
|
3
|
+
* Minimal Graphviz `dot` importer. Supports:
|
|
4
|
+
*
|
|
5
|
+
* digraph G { ... } — directed graph
|
|
6
|
+
* graph G { ... } — undirected
|
|
7
|
+
* rankdir=LR; — layout direction (TB default)
|
|
8
|
+
* a -> b; — directed edge
|
|
9
|
+
* a -- b; — undirected edge
|
|
10
|
+
* a [label="X"]; — node attributes
|
|
11
|
+
* a [shape=box]; — node shape (box / rectangle / ellipse / circle / diamond / oval)
|
|
12
|
+
* edge: `a -> b [label="x"]`
|
|
13
|
+
* Comments: `//`, `/* … *\/`, `#` at line start.
|
|
14
|
+
*
|
|
15
|
+
* Doesn't model subgraphs, ports, HTML labels, splines, or styles beyond
|
|
16
|
+
* `label` / `shape`. Anything else is skipped.
|
|
17
|
+
*/
|
|
18
|
+
export declare const parseDot: (source: string) => GraphDocument;
|
|
19
|
+
//# sourceMappingURL=dot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dot.d.ts","sourceRoot":"","sources":["../src/dot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EAKd,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,QAAQ,GAAI,QAAQ,MAAM,KAAG,aA0FzC,CAAC"}
|
package/dist/dot.js
ADDED
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal Graphviz `dot` importer. Supports:
|
|
3
|
+
*
|
|
4
|
+
* digraph G { ... } — directed graph
|
|
5
|
+
* graph G { ... } — undirected
|
|
6
|
+
* rankdir=LR; — layout direction (TB default)
|
|
7
|
+
* a -> b; — directed edge
|
|
8
|
+
* a -- b; — undirected edge
|
|
9
|
+
* a [label="X"]; — node attributes
|
|
10
|
+
* a [shape=box]; — node shape (box / rectangle / ellipse / circle / diamond / oval)
|
|
11
|
+
* edge: `a -> b [label="x"]`
|
|
12
|
+
* Comments: `//`, `/* … *\/`, `#` at line start.
|
|
13
|
+
*
|
|
14
|
+
* Doesn't model subgraphs, ports, HTML labels, splines, or styles beyond
|
|
15
|
+
* `label` / `shape`. Anything else is skipped.
|
|
16
|
+
*/
|
|
17
|
+
export const parseDot = (source) => {
|
|
18
|
+
const stripped = stripComments(source);
|
|
19
|
+
const body = extractBody(stripped);
|
|
20
|
+
if (!body)
|
|
21
|
+
return { nodes: [], edges: [], layout: "TB" };
|
|
22
|
+
const tokens = tokenize(body.body);
|
|
23
|
+
const isDirectedDefault = body.kind === "digraph";
|
|
24
|
+
const nodes = new Map();
|
|
25
|
+
const edges = [];
|
|
26
|
+
let layout = "TB";
|
|
27
|
+
let i = 0;
|
|
28
|
+
while (i < tokens.length) {
|
|
29
|
+
const tok = req(tokens[i]);
|
|
30
|
+
// Statement terminators.
|
|
31
|
+
if (tok === ";") {
|
|
32
|
+
i += 1;
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
// Graph attribute: ident = value;
|
|
36
|
+
if (isIdent(tok) &&
|
|
37
|
+
tokens[i + 1] === "=" &&
|
|
38
|
+
i + 2 < tokens.length &&
|
|
39
|
+
isValueToken(req(tokens[i + 2]))) {
|
|
40
|
+
if (tok.toLowerCase() === "rankdir") {
|
|
41
|
+
const value = unquote(req(tokens[i + 2])).toUpperCase();
|
|
42
|
+
if (value === "TB" || value === "BT" || value === "LR" || value === "RL") {
|
|
43
|
+
layout = value;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
i += 3;
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
if (!isIdent(tok)) {
|
|
50
|
+
i += 1;
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
// Node or edge starting at this ident.
|
|
54
|
+
const sourceId = unquote(tok);
|
|
55
|
+
upsertNode(nodes, sourceId, {});
|
|
56
|
+
i += 1;
|
|
57
|
+
// Optional attribute block right after node id (node statement).
|
|
58
|
+
if (tokens[i] === "[") {
|
|
59
|
+
const attrs = readAttrBlock(tokens, i);
|
|
60
|
+
i = attrs.next;
|
|
61
|
+
upsertNode(nodes, sourceId, nodeAttrs(attrs.attrs));
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
// Link: -> or -- to next node, possibly chained.
|
|
65
|
+
let prev = sourceId;
|
|
66
|
+
while (tokens[i] === "->" || tokens[i] === "--") {
|
|
67
|
+
const op = req(tokens[i]);
|
|
68
|
+
const direction = op === "->" ? "directed" : isDirectedDefault ? "directed" : "undirected";
|
|
69
|
+
i += 1;
|
|
70
|
+
const nextTok = tokens[i];
|
|
71
|
+
if (!nextTok || !isIdent(nextTok))
|
|
72
|
+
break;
|
|
73
|
+
const targetId = unquote(nextTok);
|
|
74
|
+
upsertNode(nodes, targetId, {});
|
|
75
|
+
i += 1;
|
|
76
|
+
// Optional edge attrs.
|
|
77
|
+
let edgeLabel;
|
|
78
|
+
if (tokens[i] === "[") {
|
|
79
|
+
const attrs = readAttrBlock(tokens, i);
|
|
80
|
+
i = attrs.next;
|
|
81
|
+
if (attrs.attrs.label)
|
|
82
|
+
edgeLabel = unquote(attrs.attrs.label);
|
|
83
|
+
}
|
|
84
|
+
const edge = {
|
|
85
|
+
source: prev,
|
|
86
|
+
target: targetId,
|
|
87
|
+
direction,
|
|
88
|
+
...(edgeLabel !== undefined ? { label: edgeLabel } : {}),
|
|
89
|
+
};
|
|
90
|
+
edges.push(edge);
|
|
91
|
+
prev = targetId;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return { nodes: [...nodes.values()], edges, layout };
|
|
95
|
+
};
|
|
96
|
+
// --- helpers ---
|
|
97
|
+
const req = (v) => {
|
|
98
|
+
if (v === undefined)
|
|
99
|
+
throw new Error("packages/importers: index out of range");
|
|
100
|
+
return v;
|
|
101
|
+
};
|
|
102
|
+
const stripComments = (s) => {
|
|
103
|
+
let out = "";
|
|
104
|
+
let i = 0;
|
|
105
|
+
while (i < s.length) {
|
|
106
|
+
if (s[i] === "/" && s[i + 1] === "/") {
|
|
107
|
+
while (i < s.length && s[i] !== "\n")
|
|
108
|
+
i++;
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
if (s[i] === "/" && s[i + 1] === "*") {
|
|
112
|
+
i += 2;
|
|
113
|
+
while (i < s.length && !(s[i] === "*" && s[i + 1] === "/"))
|
|
114
|
+
i++;
|
|
115
|
+
i += 2;
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
if ((i === 0 || s[i - 1] === "\n") && s[i] === "#") {
|
|
119
|
+
while (i < s.length && s[i] !== "\n")
|
|
120
|
+
i++;
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
out += s.charAt(i);
|
|
124
|
+
i++;
|
|
125
|
+
}
|
|
126
|
+
return out;
|
|
127
|
+
};
|
|
128
|
+
const extractBody = (source) => {
|
|
129
|
+
const m = /^\s*(?:strict\s+)?(digraph|graph)\s+(?:[A-Za-z_][A-Za-z0-9_]*\s+|"[^"]*"\s+)?\{([\s\S]*)\}\s*$/.exec(source);
|
|
130
|
+
if (!m)
|
|
131
|
+
return null;
|
|
132
|
+
return { kind: m[1], body: m[2] ?? "" };
|
|
133
|
+
};
|
|
134
|
+
const tokenize = (body) => {
|
|
135
|
+
const out = [];
|
|
136
|
+
let i = 0;
|
|
137
|
+
while (i < body.length) {
|
|
138
|
+
const c = body.charAt(i);
|
|
139
|
+
if (/\s/.test(c)) {
|
|
140
|
+
i++;
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
if (c === '"') {
|
|
144
|
+
let j = i + 1;
|
|
145
|
+
while (j < body.length && body[j] !== '"') {
|
|
146
|
+
if (body[j] === "\\" && j + 1 < body.length)
|
|
147
|
+
j += 2;
|
|
148
|
+
else
|
|
149
|
+
j++;
|
|
150
|
+
}
|
|
151
|
+
out.push(body.slice(i, j + 1));
|
|
152
|
+
i = j + 1;
|
|
153
|
+
continue;
|
|
154
|
+
}
|
|
155
|
+
if (c === "-" && body[i + 1] === ">") {
|
|
156
|
+
out.push("->");
|
|
157
|
+
i += 2;
|
|
158
|
+
continue;
|
|
159
|
+
}
|
|
160
|
+
if (c === "-" && body[i + 1] === "-") {
|
|
161
|
+
out.push("--");
|
|
162
|
+
i += 2;
|
|
163
|
+
continue;
|
|
164
|
+
}
|
|
165
|
+
if (c === "[" || c === "]" || c === "{" || c === "}" || c === ";" || c === "," || c === "=") {
|
|
166
|
+
out.push(c);
|
|
167
|
+
i++;
|
|
168
|
+
continue;
|
|
169
|
+
}
|
|
170
|
+
if (/[A-Za-z_0-9.]/.test(c)) {
|
|
171
|
+
let j = i;
|
|
172
|
+
while (j < body.length && /[A-Za-z_0-9.]/.test(body.charAt(j)))
|
|
173
|
+
j++;
|
|
174
|
+
out.push(body.slice(i, j));
|
|
175
|
+
i = j;
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
178
|
+
// Unknown char — skip.
|
|
179
|
+
i++;
|
|
180
|
+
}
|
|
181
|
+
return out;
|
|
182
|
+
};
|
|
183
|
+
const isIdent = (tok) => /^[A-Za-z_][A-Za-z0-9_.]*$/.test(tok) || tok.startsWith('"');
|
|
184
|
+
const isValueToken = (tok) => tok.startsWith('"') || /^[A-Za-z_0-9.]+$/.test(tok);
|
|
185
|
+
const unquote = (tok) => tok.startsWith('"') && tok.endsWith('"') ? tok.slice(1, -1) : tok;
|
|
186
|
+
const readAttrBlock = (tokens, start) => {
|
|
187
|
+
// start points at "[".
|
|
188
|
+
const attrs = {};
|
|
189
|
+
let i = start + 1;
|
|
190
|
+
while (i < tokens.length && tokens[i] !== "]") {
|
|
191
|
+
const key = req(tokens[i]);
|
|
192
|
+
if (tokens[i + 1] === "=" && i + 2 < tokens.length) {
|
|
193
|
+
attrs[key.toLowerCase()] = req(tokens[i + 2]);
|
|
194
|
+
i += 3;
|
|
195
|
+
if (tokens[i] === "," || tokens[i] === ";")
|
|
196
|
+
i++;
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
i++;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
return { attrs, next: i + 1 }; // skip "]"
|
|
203
|
+
};
|
|
204
|
+
const nodeAttrs = (raw) => {
|
|
205
|
+
let label;
|
|
206
|
+
let shape;
|
|
207
|
+
let fill;
|
|
208
|
+
let stroke;
|
|
209
|
+
if (raw.label)
|
|
210
|
+
label = unquote(raw.label);
|
|
211
|
+
if (raw.shape)
|
|
212
|
+
shape = dotShape(unquote(raw.shape).toLowerCase());
|
|
213
|
+
if (raw.fillcolor)
|
|
214
|
+
fill = unquote(raw.fillcolor);
|
|
215
|
+
if (raw.color)
|
|
216
|
+
stroke = unquote(raw.color);
|
|
217
|
+
return {
|
|
218
|
+
...(label !== undefined ? { label } : {}),
|
|
219
|
+
...(shape !== undefined ? { shape } : {}),
|
|
220
|
+
...(fill !== undefined ? { fill } : {}),
|
|
221
|
+
...(stroke !== undefined ? { stroke } : {}),
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
const dotShape = (s) => {
|
|
225
|
+
switch (s) {
|
|
226
|
+
case "box":
|
|
227
|
+
case "rect":
|
|
228
|
+
case "rectangle":
|
|
229
|
+
case "square":
|
|
230
|
+
return "rectangle";
|
|
231
|
+
case "ellipse":
|
|
232
|
+
case "oval":
|
|
233
|
+
return "ellipse";
|
|
234
|
+
case "circle":
|
|
235
|
+
return "ellipse";
|
|
236
|
+
case "diamond":
|
|
237
|
+
return "diamond";
|
|
238
|
+
default:
|
|
239
|
+
return undefined;
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
const upsertNode = (nodes, id, extra) => {
|
|
243
|
+
const existing = nodes.get(id) ?? { id };
|
|
244
|
+
nodes.set(id, { ...existing, ...extra });
|
|
245
|
+
};
|
|
246
|
+
//# sourceMappingURL=dot.js.map
|
package/dist/dot.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dot.js","sourceRoot":"","sources":["../src/dot.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,MAAc,EAAiB,EAAE;IACxD,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IACvC,MAAM,IAAI,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;IACnC,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAEzD,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnC,MAAM,iBAAiB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AAK,EAAE,CAAC,CAAC;AAC3C,CAAC,CAAC"}
|
package/dist/drawio.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { GraphDocument } from "./graph.js";
|
|
2
|
+
/**
|
|
3
|
+
* Minimal drawio importer. Targets the *uncompressed* `mxGraphModel` XML
|
|
4
|
+
* payload — what you get from `<mxfile>...<diagram>...<mxGraphModel>...`
|
|
5
|
+
* when "Pretty print" is on, or the inner `<root>...</root>` of a saved
|
|
6
|
+
* `.drawio` file.
|
|
7
|
+
*
|
|
8
|
+
* Supports:
|
|
9
|
+
* - `<mxCell vertex="1" style="..." value="..."><mxGeometry .../></mxCell>`
|
|
10
|
+
* → `GraphNode` with explicit position (so layout is skipped).
|
|
11
|
+
* - `<mxCell edge="1" source="..." target="..." value="..." />`
|
|
12
|
+
* → `GraphEdge`.
|
|
13
|
+
*
|
|
14
|
+
* Element is inferred from the `style="..."` attribute (`ellipse`,
|
|
15
|
+
* `rhombus`/`diamond`, otherwise rectangle). Drawio-style colour stops,
|
|
16
|
+
* groups, swimlanes, etc. are ignored.
|
|
17
|
+
*/
|
|
18
|
+
export declare const parseDrawio: (source: string) => GraphDocument;
|
|
19
|
+
//# sourceMappingURL=drawio.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawio.d.ts","sourceRoot":"","sources":["../src/drawio.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAmC,MAAM,YAAY,CAAC;AAEjF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,WAAW,GAAI,QAAQ,MAAM,KAAG,aA+C5C,CAAC"}
|