@thi.ng/dot 1.2.38 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +54 -19
- package/README.md +14 -5
- package/index.d.ts +2 -2
- package/index.js +2 -2
- package/package.json +34 -23
- package/serialize.d.ts +1 -1
- package/serialize.js +1 -1
- package/lib/index.js +0 -119
- package/lib/index.js.map +0 -1
- package/lib/index.umd.js +0 -1
- package/lib/index.umd.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [
|
|
6
|
+
## [2.0.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/dot@2.0.2...@thi.ng/dot@2.0.3) (2021-10-15)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @thi.ng/dot
|
|
9
9
|
|
|
@@ -11,42 +11,77 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
## [2.0.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/dot@2.0.1...@thi.ng/dot@2.0.2) (2021-10-15)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @thi.ng/dot
|
|
17
|
+
|
|
15
18
|
|
|
16
19
|
|
|
17
|
-
### Features
|
|
18
20
|
|
|
19
|
-
* **dot:** support includes, update subgraph handling ([ed53c90](https://github.com/thi-ng/umbrella/commit/ed53c909f7eb41c85c04f55de279e0d82cfed307))
|
|
20
21
|
|
|
22
|
+
## [2.0.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/dot@2.0.0...@thi.ng/dot@2.0.1) (2021-10-13)
|
|
21
23
|
|
|
24
|
+
**Note:** Version bump only for package @thi.ng/dot
|
|
22
25
|
|
|
23
26
|
|
|
24
27
|
|
|
25
|
-
# [1.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/dot@1.0.12...@thi.ng/dot@1.1.0) (2019-07-07)
|
|
26
28
|
|
|
27
|
-
### Features
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
# [2.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/dot@1.2.38...@thi.ng/dot@2.0.0) (2021-10-12)
|
|
30
31
|
|
|
31
|
-
# [1.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/dot@0.1.18...@thi.ng/dot@1.0.0) (2019-01-21)
|
|
32
32
|
|
|
33
33
|
### Build System
|
|
34
34
|
|
|
35
|
-
* update
|
|
35
|
+
* major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea9fab2a645d6c5f2bf2591459b939c09b6))
|
|
36
|
+
|
|
36
37
|
|
|
37
38
|
### BREAKING CHANGES
|
|
38
39
|
|
|
39
|
-
*
|
|
40
|
+
* discontinue CommonJS & UMD versions
|
|
41
|
+
|
|
42
|
+
- only ESM modules will be published from now on
|
|
43
|
+
- CJS obsolete due to ESM support in recent versions of node:
|
|
44
|
+
- i.e. launch NodeJS via:
|
|
45
|
+
- `node --experimental-specifier-resolution=node --experimental-repl-await`
|
|
46
|
+
- in the node REPL use `await import(...)` instead of `require()`
|
|
47
|
+
- UMD obsolete due to widespread browser support for ESM
|
|
48
|
+
|
|
49
|
+
Also:
|
|
50
|
+
- normalize/restructure/reorg all package.json files
|
|
51
|
+
- cleanup all build scripts, remove obsolete
|
|
52
|
+
- switch from mocha to @thi.ng/testament for all tests
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
# [1.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/dot@1.1.14...@thi.ng/dot@1.2.0) (2020-04-03)
|
|
60
|
+
|
|
61
|
+
### Features
|
|
62
|
+
|
|
63
|
+
- **dot:** support includes, update subgraph handling ([ed53c90](https://github.com/thi-ng/umbrella/commit/ed53c909f7eb41c85c04f55de279e0d82cfed307))
|
|
64
|
+
|
|
65
|
+
# [1.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/dot@1.0.12...@thi.ng/dot@1.1.0) (2019-07-07)
|
|
66
|
+
|
|
67
|
+
### Features
|
|
68
|
+
|
|
69
|
+
- **dot:** enable TS strict compiler flags (refactor) ([29e0cb4](https://github.com/thi-ng/umbrella/commit/29e0cb4))
|
|
70
|
+
|
|
71
|
+
# [1.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/dot@0.1.18...@thi.ng/dot@1.0.0) (2019-01-21)
|
|
72
|
+
|
|
73
|
+
### Build System
|
|
74
|
+
|
|
75
|
+
- update package build scripts & outputs, imports in ~50 packages ([b54b703](https://github.com/thi-ng/umbrella/commit/b54b703))
|
|
76
|
+
|
|
77
|
+
### BREAKING CHANGES
|
|
40
78
|
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
- all imports MUST be updated to only refer to package level
|
|
44
|
-
(not individual files anymore). tree shaking in user land will get rid of
|
|
45
|
-
all unused imported symbols.
|
|
79
|
+
- enabled multi-outputs (ES6 modules, CJS, UMD)
|
|
80
|
+
- build scripts now first build ES6 modules in package root, then call `scripts/bundle-module` to build minified CJS & UMD bundles in `/lib`
|
|
81
|
+
- all imports MUST be updated to only refer to package level (not individual files anymore). tree shaking in user land will get rid of all unused imported symbols.
|
|
46
82
|
|
|
47
|
-
|
|
48
|
-
# 0.1.0 (2018-05-09)
|
|
83
|
+
# 0.1.0 (2018-05-09)
|
|
49
84
|
|
|
50
|
-
###
|
|
85
|
+
### Features
|
|
51
86
|
|
|
52
|
-
|
|
87
|
+
- **dot:** initial import [@thi](https://github.com/thi).ng/dot ([500dfa3](https://github.com/thi-ng/umbrella/commit/500dfa3))
|
package/README.md
CHANGED
|
@@ -51,15 +51,24 @@ details.
|
|
|
51
51
|
yarn add @thi.ng/dot
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
+
ES module import:
|
|
55
|
+
|
|
54
56
|
```html
|
|
55
|
-
|
|
56
|
-
|
|
57
|
+
<script type="module" src="https://cdn.skypack.dev/@thi.ng/dot"></script>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
[Skypack documentation](https://docs.skypack.dev/)
|
|
61
|
+
|
|
62
|
+
For Node.js REPL:
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
# with flag only for < v16
|
|
66
|
+
node --experimental-repl-await
|
|
57
67
|
|
|
58
|
-
|
|
59
|
-
<script src="https://unpkg.com/@thi.ng/dot/lib/index.umd.js" crossorigin></script>
|
|
68
|
+
> const dot = await import("@thi.ng/dot");
|
|
60
69
|
```
|
|
61
70
|
|
|
62
|
-
Package sizes (gzipped, pre-treeshake): ESM:
|
|
71
|
+
Package sizes (gzipped, pre-treeshake): ESM: 773 bytes
|
|
63
72
|
|
|
64
73
|
## Dependencies
|
|
65
74
|
|
package/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./api";
|
|
2
|
-
export * from "./serialize";
|
|
1
|
+
export * from "./api.js";
|
|
2
|
+
export * from "./serialize.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./api";
|
|
2
|
-
export * from "./serialize";
|
|
1
|
+
export * from "./api.js";
|
|
2
|
+
export * from "./serialize.js";
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/dot",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "Graphviz document abstraction & serialization to DOT format",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"module": "./index.js",
|
|
6
|
-
"main": "./lib/index.js",
|
|
7
|
-
"umd:main": "./lib/index.umd.js",
|
|
8
7
|
"typings": "./index.d.ts",
|
|
8
|
+
"sideEffects": false,
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "https://github.com/thi-ng/umbrella.git"
|
|
@@ -24,28 +24,22 @@
|
|
|
24
24
|
"author": "Karsten Schmidt <k+npm@thi.ng>",
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"scripts": {
|
|
27
|
-
"build": "yarn clean &&
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"build:test": "rimraf build && tsc -p test/tsconfig.json",
|
|
31
|
-
"build:check": "tsc --isolatedModules --noEmit",
|
|
32
|
-
"test": "mocha test",
|
|
33
|
-
"cover": "nyc mocha test && nyc report --reporter=lcov",
|
|
34
|
-
"clean": "rimraf *.js *.d.ts *.map .nyc_output build coverage doc lib",
|
|
35
|
-
"doc:readme": "ts-node -P ../../tools/tsconfig.json ../../tools/src/readme.ts",
|
|
36
|
-
"doc": "typedoc --excludePrivate --out doc --theme ../../tools/doc/typedoc-theme src/index.ts",
|
|
27
|
+
"build": "yarn clean && tsc --declaration",
|
|
28
|
+
"clean": "rimraf *.js *.d.ts *.map doc",
|
|
29
|
+
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
|
|
37
30
|
"doc:ae": "mkdir -p .ae/doc .ae/temp && node_modules/.bin/api-extractor run --local --verbose",
|
|
38
|
-
"
|
|
31
|
+
"doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts",
|
|
32
|
+
"doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts",
|
|
33
|
+
"pub": "yarn build && yarn publish --access public",
|
|
34
|
+
"test": "testament test"
|
|
39
35
|
},
|
|
40
36
|
"dependencies": {
|
|
41
|
-
"@thi.ng/api": "^
|
|
42
|
-
"@thi.ng/checks": "^
|
|
37
|
+
"@thi.ng/api": "^8.0.3",
|
|
38
|
+
"@thi.ng/checks": "^3.0.3"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@thi.ng/testament": "^0.1.3"
|
|
43
42
|
},
|
|
44
|
-
"files": [
|
|
45
|
-
"*.js",
|
|
46
|
-
"*.d.ts",
|
|
47
|
-
"lib"
|
|
48
|
-
],
|
|
49
43
|
"keywords": [
|
|
50
44
|
"2d",
|
|
51
45
|
"export",
|
|
@@ -59,7 +53,24 @@
|
|
|
59
53
|
"publishConfig": {
|
|
60
54
|
"access": "public"
|
|
61
55
|
},
|
|
62
|
-
"
|
|
56
|
+
"engines": {
|
|
57
|
+
"node": ">=12.7"
|
|
58
|
+
},
|
|
59
|
+
"files": [
|
|
60
|
+
"*.js",
|
|
61
|
+
"*.d.ts"
|
|
62
|
+
],
|
|
63
|
+
"exports": {
|
|
64
|
+
".": {
|
|
65
|
+
"import": "./index.js"
|
|
66
|
+
},
|
|
67
|
+
"./api": {
|
|
68
|
+
"import": "./api.js"
|
|
69
|
+
},
|
|
70
|
+
"./serialize": {
|
|
71
|
+
"import": "./serialize.js"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
63
74
|
"thi.ng": {
|
|
64
75
|
"related": [
|
|
65
76
|
"adjacency",
|
|
@@ -68,5 +79,5 @@
|
|
|
68
79
|
"status": "beta",
|
|
69
80
|
"year": 2018
|
|
70
81
|
},
|
|
71
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "1fb38cac74d6c009d96855c28784a267a81badf1"
|
|
72
83
|
}
|
package/serialize.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Edge, Graph, Node } from "./api";
|
|
1
|
+
import type { Edge, Graph, Node } from "./api.js";
|
|
2
2
|
export declare const serializeNode: (id: string, n: Partial<Node>) => string;
|
|
3
3
|
export declare const serializeEdge: (e: Edge, directed?: boolean) => string;
|
|
4
4
|
export declare const serializeGraph: (graph: Graph, isSub?: boolean) => string;
|
package/serialize.js
CHANGED
package/lib/index.js
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var checks = require('@thi.ng/checks');
|
|
6
|
-
|
|
7
|
-
let nextID = 0;
|
|
8
|
-
const nextSubgraphID = () => "cluster" + nextID++;
|
|
9
|
-
const wrapQ = (x) => `"${x}"`;
|
|
10
|
-
const escape = (x) => String(x).replace(/\"/g, `\\"`).replace(/\n/g, "\\n");
|
|
11
|
-
const formatGraphAttribs = (attribs, acc) => {
|
|
12
|
-
for (let a in attribs) {
|
|
13
|
-
let v = attribs[a];
|
|
14
|
-
switch (a) {
|
|
15
|
-
case "bgcolor":
|
|
16
|
-
case "color":
|
|
17
|
-
case "fillcolor":
|
|
18
|
-
case "fontcolor":
|
|
19
|
-
checks.isArray(v) && (v = v.join(","));
|
|
20
|
-
break;
|
|
21
|
-
case "edge":
|
|
22
|
-
acc.push(`edge[${formatAttribs(v)}];`);
|
|
23
|
-
continue;
|
|
24
|
-
case "node":
|
|
25
|
-
acc.push(`node[${formatAttribs(v)}];`);
|
|
26
|
-
continue;
|
|
27
|
-
}
|
|
28
|
-
acc.push(`${a}="${escape(v)}";`);
|
|
29
|
-
}
|
|
30
|
-
return acc;
|
|
31
|
-
};
|
|
32
|
-
const formatAttribs = (attribs) => {
|
|
33
|
-
const acc = [];
|
|
34
|
-
for (let a in attribs) {
|
|
35
|
-
let v = attribs[a];
|
|
36
|
-
switch (a) {
|
|
37
|
-
case "color":
|
|
38
|
-
case "fillcolor":
|
|
39
|
-
case "fontcolor":
|
|
40
|
-
checks.isArray(v) && (v = v.join(","));
|
|
41
|
-
break;
|
|
42
|
-
case "label":
|
|
43
|
-
if (attribs.ins || attribs.outs) {
|
|
44
|
-
v = formatPortLabel(attribs, v);
|
|
45
|
-
}
|
|
46
|
-
break;
|
|
47
|
-
case "url":
|
|
48
|
-
a = "URL";
|
|
49
|
-
break;
|
|
50
|
-
case "ins":
|
|
51
|
-
case "outs":
|
|
52
|
-
case "src":
|
|
53
|
-
case "dest":
|
|
54
|
-
case "srcPort":
|
|
55
|
-
case "destPort":
|
|
56
|
-
continue;
|
|
57
|
-
}
|
|
58
|
-
acc.push(`${a}="${escape(v)}"`);
|
|
59
|
-
}
|
|
60
|
-
return acc.join(", ");
|
|
61
|
-
};
|
|
62
|
-
const formatPorts = (ports) => {
|
|
63
|
-
const acc = [];
|
|
64
|
-
for (let i in ports) {
|
|
65
|
-
acc.push(`<${i}> ${escape(ports[i])}`);
|
|
66
|
-
}
|
|
67
|
-
return `{ ${acc.join(" | ")} }`;
|
|
68
|
-
};
|
|
69
|
-
const formatPortLabel = (node, label) => {
|
|
70
|
-
const acc = [];
|
|
71
|
-
node.ins && acc.push(formatPorts(node.ins));
|
|
72
|
-
acc.push(escape(label));
|
|
73
|
-
node.outs && acc.push(formatPorts(node.outs));
|
|
74
|
-
return acc.join(" | ");
|
|
75
|
-
};
|
|
76
|
-
const serializeNode = (id, n) => {
|
|
77
|
-
const attribs = formatAttribs(n);
|
|
78
|
-
return attribs.length ? `"${id}"[${attribs}];` : `"${id}";`;
|
|
79
|
-
};
|
|
80
|
-
const serializeEdge = (e, directed = true) => {
|
|
81
|
-
const acc = [wrapQ(e.src)];
|
|
82
|
-
e.srcPort != null && acc.push(":", wrapQ(e.srcPort));
|
|
83
|
-
acc.push(directed ? " -> " : " -- ");
|
|
84
|
-
acc.push(wrapQ(e.dest));
|
|
85
|
-
e.destPort != null && acc.push(":", wrapQ(e.destPort));
|
|
86
|
-
const attribs = formatAttribs(e);
|
|
87
|
-
attribs.length && acc.push("[", attribs, "]");
|
|
88
|
-
acc.push(";");
|
|
89
|
-
return acc.join("");
|
|
90
|
-
};
|
|
91
|
-
const serializeGraph = (graph, isSub = false) => {
|
|
92
|
-
const directed = graph.directed !== false;
|
|
93
|
-
const acc = isSub
|
|
94
|
-
? [`subgraph ${graph.id || nextSubgraphID()} {`]
|
|
95
|
-
: [`${directed ? "di" : ""}graph ${graph.id || "g"} {`];
|
|
96
|
-
if (graph.include) {
|
|
97
|
-
acc.push(graph.include);
|
|
98
|
-
}
|
|
99
|
-
if (graph.attribs) {
|
|
100
|
-
formatGraphAttribs(graph.attribs, acc);
|
|
101
|
-
}
|
|
102
|
-
for (let id in graph.nodes) {
|
|
103
|
-
acc.push(serializeNode(id, graph.nodes[id]));
|
|
104
|
-
}
|
|
105
|
-
for (let e of graph.edges) {
|
|
106
|
-
acc.push(serializeEdge(e, directed));
|
|
107
|
-
}
|
|
108
|
-
if (graph.sub) {
|
|
109
|
-
for (let sub of graph.sub) {
|
|
110
|
-
acc.push(serializeGraph(sub, true));
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
acc.push("}");
|
|
114
|
-
return acc.join("\n");
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
exports.serializeEdge = serializeEdge;
|
|
118
|
-
exports.serializeGraph = serializeGraph;
|
|
119
|
-
exports.serializeNode = serializeNode;
|
package/lib/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../serialize.js"],"sourcesContent":null,"names":["isArray"],"mappings":";;;;;;AACA,IAAI,MAAM,GAAG,CAAC,CAAC;AACf,MAAM,cAAc,GAAG,MAAM,SAAS,GAAG,MAAM,EAAE,CAAC;AAClD,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9B,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAC5E,MAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE,GAAG,KAAK;AAC7C,IAAI,KAAK,IAAI,CAAC,IAAI,OAAO,EAAE;AAC3B,QAAQ,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAC3B,QAAQ,QAAQ,CAAC;AACjB,YAAY,KAAK,S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AC,GAAG,EAAE;AACnB,QAAQ,KAAK,IAAI,GAAG,IAAI,KAAK,CAAC,GAAG,EAAE;AACnC,YAAY,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;AAChD,SAAS;AACT,KAAK;AACL,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClB,IAAI,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B;;;;;;"}
|
package/lib/index.umd.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(e,s){"object"==typeof exports&&"undefined"!=typeof module?s(exports,require("@thi.ng/checks")):"function"==typeof define&&define.amd?define(["exports","@thi.ng/checks"],s):s(((e="undefined"!=typeof globalThis?globalThis:e||self).thi=e.thi||{},e.thi.ng=e.thi.ng||{},e.thi.ng.dot={}),e.thi.ng.checks)}(this,(function(e,s){"use strict";let t=0;const o=e=>`"${e}"`,n=e=>String(e).replace(/\"/g,'\\"').replace(/\n/g,"\\n"),r=e=>{const t=[];for(let o in e){let r=e[o];switch(o){case"color":case"fillcolor":case"fontcolor":s.isArray(r)&&(r=r.join(","));break;case"label":(e.ins||e.outs)&&(r=c(e,r));break;case"url":o="URL";break;case"ins":case"outs":case"src":case"dest":case"srcPort":case"destPort":continue}t.push(`${o}="${n(r)}"`)}return t.join(", ")},i=e=>{const s=[];for(let t in e)s.push(`<${t}> ${n(e[t])}`);return`{ ${s.join(" | ")} }`},c=(e,s)=>{const t=[];return e.ins&&t.push(i(e.ins)),t.push(n(s)),e.outs&&t.push(i(e.outs)),t.join(" | ")},u=(e,s)=>{const t=r(s);return t.length?`"${e}"[${t}];`:`"${e}";`},l=(e,s=!0)=>{const t=[o(e.src)];null!=e.srcPort&&t.push(":",o(e.srcPort)),t.push(s?" -> ":" -- "),t.push(o(e.dest)),null!=e.destPort&&t.push(":",o(e.destPort));const n=r(e);return n.length&&t.push("[",n,"]"),t.push(";"),t.join("")},h=(e,o=!1)=>{const i=!1!==e.directed,c=o?[`subgraph ${e.id||"cluster"+t++} {`]:[`${i?"di":""}graph ${e.id||"g"} {`];e.include&&c.push(e.include),e.attribs&&((e,t)=>{for(let o in e){let i=e[o];switch(o){case"bgcolor":case"color":case"fillcolor":case"fontcolor":s.isArray(i)&&(i=i.join(","));break;case"edge":t.push(`edge[${r(i)}];`);continue;case"node":t.push(`node[${r(i)}];`);continue}t.push(`${o}="${n(i)}";`)}})(e.attribs,c);for(let s in e.nodes)c.push(u(s,e.nodes[s]));for(let s of e.edges)c.push(l(s,i));if(e.sub)for(let s of e.sub)c.push(h(s,!0));return c.push("}"),c.join("\n")};e.serializeEdge=l,e.serializeGraph=h,e.serializeNode=u,Object.defineProperty(e,"__esModule",{value:!0})}));
|
package/lib/index.umd.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.umd.js","sources":["../serialize.js"],"sourcesContent":null,"names":["isArray"],"mappings":";;;;;;IACA,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,MAAM,cAAc,GAAG,MAAM,SAAS,GAAG,MAAM,EAAE,CAAC;IAClD,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9B,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC5E,MAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE,GAAG,KAAK;IAC7C,IAAI,KAAK,IAAI,CAAC,IAAI,OAAO,EAAE;IAC3B,QAAQ,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3B,QAAQ,QAAQ,CAAC;IACjB,YAAY,KAAK,SAAS,CAAC;IAC3B,YAAY,KAAK,OAAO,CAAC;IAC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