@thi.ng/rstream-dot 1.2.28 → 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 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
- ## [1.2.28](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-dot@1.2.27...@thi.ng/rstream-dot@1.2.28) (2021-08-22)
6
+ ## [2.0.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-dot@2.0.2...@thi.ng/rstream-dot@2.0.3) (2021-10-15)
7
7
 
8
8
  **Note:** Version bump only for package @thi.ng/rstream-dot
9
9
 
@@ -11,51 +11,85 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
11
11
 
12
12
 
13
13
 
14
- # [1.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-dot@1.1.59...@thi.ng/rstream-dot@1.2.0) (2021-02-22)
14
+ ## [2.0.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-dot@2.0.1...@thi.ng/rstream-dot@2.0.2) (2021-10-15)
15
+
16
+ **Note:** Version bump only for package @thi.ng/rstream-dot
17
+
15
18
 
16
19
 
17
- ### Features
18
20
 
19
- * **rstream-dot:** update opts, deps & value handling ([be0b146](https://github.com/thi-ng/umbrella/commit/be0b146b2daeeff560f704bc5771ce5390e2ecf3))
20
21
 
22
+ ## [2.0.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-dot@2.0.0...@thi.ng/rstream-dot@2.0.1) (2021-10-13)
21
23
 
24
+ **Note:** Version bump only for package @thi.ng/rstream-dot
22
25
 
23
26
 
24
27
 
25
- # [1.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-dot@1.0.26...@thi.ng/rstream-dot@1.1.0) (2019-07-07)
26
28
 
27
- ### Features
28
29
 
29
- * **rstream-dot:** enable TS strict compiler flags (refactor) ([acfe75e](https://github.com/thi-ng/umbrella/commit/acfe75e))
30
+ # [2.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-dot@1.2.29...@thi.ng/rstream-dot@2.0.0) (2021-10-12)
30
31
 
31
- # [1.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-dot@0.2.64...@thi.ng/rstream-dot@1.0.0) (2019-01-21)
32
32
 
33
33
  ### Build System
34
34
 
35
- * update package scripts, outputs, imports in remaining packages ([f912a84](https://github.com/thi-ng/umbrella/commit/f912a84))
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
- * enable multi-outputs (ES6 modules, CJS, UMD)
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/rstream-dot@1.1.59...@thi.ng/rstream-dot@1.2.0) (2021-02-22)
60
+
61
+ ### Features
62
+
63
+ - **rstream-dot:** update opts, deps & value handling ([be0b146](https://github.com/thi-ng/umbrella/commit/be0b146b2daeeff560f704bc5771ce5390e2ecf3))
64
+
65
+ # [1.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-dot@1.0.26...@thi.ng/rstream-dot@1.1.0) (2019-07-07)
66
+
67
+ ### Features
68
+
69
+ - **rstream-dot:** enable TS strict compiler flags (refactor) ([acfe75e](https://github.com/thi-ng/umbrella/commit/acfe75e))
70
+
71
+ # [1.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-dot@0.2.64...@thi.ng/rstream-dot@1.0.0) (2019-01-21)
72
+
73
+ ### Build System
74
+
75
+ - update package scripts, outputs, imports in remaining packages ([f912a84](https://github.com/thi-ng/umbrella/commit/f912a84))
76
+
77
+ ### BREAKING CHANGES
40
78
 
41
- - build scripts now first build ES6 modules in package root, then call
42
- `scripts/bundle-module` to build minified CJS & UMD bundles in `/lib`
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
+ - enable 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
- <a name="0.2.0"></a>
48
- # [0.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-dot@0.1.2...@thi.ng/rstream-dot@0.2.0) (2018-04-26)
83
+ # [0.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-dot@0.1.2...@thi.ng/rstream-dot@0.2.0) (2018-04-26)
49
84
 
50
- ### Features
85
+ ### Features
51
86
 
52
- * **rstream-dot:** add option to include stream values in diag ([d057d95](https://github.com/thi-ng/umbrella/commit/d057d95))
87
+ - **rstream-dot:** add option to include stream values in diag ([d057d95](https://github.com/thi-ng/umbrella/commit/d057d95))
53
88
 
54
- <a name="0.1.0"></a>
55
- # 0.1.0 (2018-04-24)
89
+ # 0.1.0 (2018-04-24)
56
90
 
57
- ### Features
91
+ ### Features
58
92
 
59
- * **rstream-dot:** add xform edge labels, extract types to api.ts ([7ffaa61](https://github.com/thi-ng/umbrella/commit/7ffaa61))
60
- * **rstream-dot:** initial import [@thi](https://github.com/thi).ng/rstream-dot package ([e72478a](https://github.com/thi-ng/umbrella/commit/e72478a))
61
- * **rstream-dot:** support multiple roots in walk() ([704025a](https://github.com/thi-ng/umbrella/commit/704025a))
93
+ - **rstream-dot:** add xform edge labels, extract types to api.ts ([7ffaa61](https://github.com/thi-ng/umbrella/commit/7ffaa61))
94
+ - **rstream-dot:** initial import [@thi](https://github.com/thi).ng/rstream-dot package ([e72478a](https://github.com/thi-ng/umbrella/commit/e72478a))
95
+ - **rstream-dot:** support multiple roots in walk() ([704025a](https://github.com/thi-ng/umbrella/commit/704025a))
package/README.md CHANGED
@@ -14,6 +14,7 @@ This project is part of the
14
14
  - [Related packages](#related-packages)
15
15
  - [Installation](#installation)
16
16
  - [Dependencies](#dependencies)
17
+ - [Usage examples](#usage-examples)
17
18
  - [API](#api)
18
19
  - [Authors](#authors)
19
20
  - [License](#license)
@@ -39,15 +40,24 @@ Graphviz DOT conversion of [@thi.ng/rstream](https://github.com/thi-ng/umbrella/
39
40
  yarn add @thi.ng/rstream-dot
40
41
  ```
41
42
 
43
+ ES module import:
44
+
42
45
  ```html
43
- // ES module
44
- <script type="module" src="https://unpkg.com/@thi.ng/rstream-dot?module" crossorigin></script>
46
+ <script type="module" src="https://cdn.skypack.dev/@thi.ng/rstream-dot"></script>
47
+ ```
48
+
49
+ [Skypack documentation](https://docs.skypack.dev/)
50
+
51
+ For Node.js REPL:
52
+
53
+ ```text
54
+ # with flag only for < v16
55
+ node --experimental-repl-await
45
56
 
46
- // UMD
47
- <script src="https://unpkg.com/@thi.ng/rstream-dot/lib/index.umd.js" crossorigin></script>
57
+ > const rstreamDot = await import("@thi.ng/rstream-dot");
48
58
  ```
49
59
 
50
- Package sizes (gzipped, pre-treeshake): ESM: 864 bytes / CJS: 911 bytes / UMD: 986 bytes
60
+ Package sizes (gzipped, pre-treeshake): ESM: 870 bytes
51
61
 
52
62
  ## Dependencies
53
63
 
@@ -55,6 +65,18 @@ Package sizes (gzipped, pre-treeshake): ESM: 864 bytes / CJS: 911 bytes / UMD: 9
55
65
  - [@thi.ng/strings](https://github.com/thi-ng/umbrella/tree/develop/packages/strings)
56
66
  - [@thi.ng/transducers](https://github.com/thi-ng/umbrella/tree/develop/packages/transducers)
57
67
 
68
+ ## Usage examples
69
+
70
+ Several demos in this repo's
71
+ [/examples](https://github.com/thi-ng/umbrella/tree/develop/examples)
72
+ directory are using this package.
73
+
74
+ A selection:
75
+
76
+ | Description | Live demo | Source |
77
+ |:-------------------------------|:-------------------------------------------------------|:------------------------------------------------------------------------------------|
78
+ | Minimal rstream dataflow graph | [Demo](https://demo.thi.ng/umbrella/rstream-dataflow/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/rstream-dataflow) |
79
+
58
80
  ## API
59
81
 
60
82
  [Generated API docs](https://docs.thi.ng/umbrella/rstream-dot/)
package/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { ISubscribable } from "@thi.ng/rstream";
2
- import type { DotOpts, WalkState } from "./api";
3
- export * from "./api";
1
+ import type { ISubscribable } from "@thi.ng/rstream";
2
+ import type { DotOpts, WalkState } from "./api.js";
3
+ export * from "./api.js";
4
4
  export declare const walk: (subs: ISubscribable<any>[], opts?: Partial<DotOpts> | undefined, state?: WalkState | undefined) => WalkState;
5
5
  export declare const toDot: (state: WalkState, opts?: Partial<DotOpts> | undefined) => string;
6
6
  //# sourceMappingURL=index.d.ts.map
package/index.js CHANGED
@@ -1,7 +1,9 @@
1
- import { Stream, StreamMerge, StreamSync, } from "@thi.ng/rstream";
2
- import { truncate } from "@thi.ng/strings";
3
- import { map } from "@thi.ng/transducers";
4
- export * from "./api";
1
+ import { StreamMerge } from "@thi.ng/rstream/merge";
2
+ import { Stream } from "@thi.ng/rstream/stream";
3
+ import { StreamSync } from "@thi.ng/rstream/sync";
4
+ import { truncate } from "@thi.ng/strings/truncate";
5
+ import { map } from "@thi.ng/transducers/map";
6
+ export * from "./api.js";
5
7
  const getNodeType = (sub) => sub instanceof Stream
6
8
  ? "Stream"
7
9
  : sub instanceof StreamSync
@@ -55,8 +57,21 @@ export const walk = (subs, opts, state) => {
55
57
  return state;
56
58
  };
57
59
  export const toDot = (state, opts) => {
58
- opts = Object.assign({ dir: "TB", font: "sans-serif", fontsize: 10, text: "white" }, opts);
59
- opts.color = Object.assign({ default: "black", noid: "gray", stream: "blue", streammerge: "red", streamsync: "red" }, (opts.color || {}));
60
+ opts = {
61
+ dir: "TB",
62
+ font: "sans-serif",
63
+ fontsize: 10,
64
+ text: "white",
65
+ ...opts,
66
+ };
67
+ opts.color = {
68
+ default: "black",
69
+ noid: "gray",
70
+ stream: "blue",
71
+ streammerge: "red",
72
+ streamsync: "red",
73
+ ...(opts.color || {}),
74
+ };
60
75
  return [
61
76
  "digraph g {",
62
77
  `rankdir=${opts.dir};`,
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@thi.ng/rstream-dot",
3
- "version": "1.2.28",
3
+ "version": "2.0.3",
4
4
  "description": "Graphviz DOT conversion of @thi.ng/rstream dataflow graph topologies",
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,29 +24,23 @@
24
24
  "author": "Karsten Schmidt <k+npm@thi.ng>",
25
25
  "license": "Apache-2.0",
26
26
  "scripts": {
27
- "build": "yarn clean && yarn build:es6 && node ../../scripts/bundle-module",
28
- "build:release": "yarn clean && yarn build:es6 && node ../../scripts/bundle-module all",
29
- "build:es6": "tsc --declaration",
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
- "pub": "yarn build:release && yarn publish --access public"
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/rstream": "^6.0.20",
42
- "@thi.ng/strings": "^2.1.6",
43
- "@thi.ng/transducers": "^7.9.1"
37
+ "@thi.ng/rstream": "^7.0.3",
38
+ "@thi.ng/strings": "^3.0.3",
39
+ "@thi.ng/transducers": "^8.0.3"
40
+ },
41
+ "devDependencies": {
42
+ "@thi.ng/testament": "^0.1.3"
44
43
  },
45
- "files": [
46
- "*.js",
47
- "*.d.ts",
48
- "lib"
49
- ],
50
44
  "keywords": [
51
45
  "conversion",
52
46
  "dataflow",
@@ -63,7 +57,21 @@
63
57
  "publishConfig": {
64
58
  "access": "public"
65
59
  },
66
- "sideEffects": false,
60
+ "engines": {
61
+ "node": ">=12.7"
62
+ },
63
+ "files": [
64
+ "*.js",
65
+ "*.d.ts"
66
+ ],
67
+ "exports": {
68
+ ".": {
69
+ "import": "./index.js"
70
+ },
71
+ "./api": {
72
+ "import": "./api.js"
73
+ }
74
+ },
67
75
  "thi.ng": {
68
76
  "parent": "@thi.ng/rstream",
69
77
  "related": [
@@ -72,5 +80,5 @@
72
80
  ],
73
81
  "year": 2018
74
82
  },
75
- "gitHead": "8ead409ded4bf8dceb0f24a538ba5ca00d07108d"
83
+ "gitHead": "1fb38cac74d6c009d96855c28784a267a81badf1"
76
84
  }
package/lib/index.js DELETED
@@ -1,76 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var rstream = require('@thi.ng/rstream');
6
- var strings = require('@thi.ng/strings');
7
- var transducers = require('@thi.ng/transducers');
8
-
9
- const getNodeType = (sub) => sub instanceof rstream.Stream
10
- ? "Stream"
11
- : sub instanceof rstream.StreamSync
12
- ? "StreamSync"
13
- : sub instanceof rstream.StreamMerge
14
- ? "StreamMerge"
15
- : undefined;
16
- const dotNode = (s, opts) => {
17
- let res = `s${s.id}[label="`;
18
- res += s.type ? `${s.label}\\n(${s.type})` : `${s.label}`;
19
- if (s.body !== undefined) {
20
- res += `\\n${s.body.replace(/"/g, `'`).replace(/\n/g, "\\n")}`;
21
- }
22
- res += `", color="`;
23
- res +=
24
- (s.type && opts.color[s.type.toLowerCase()]) ||
25
- (s.label === "<noid>" ? opts.color.noid : opts.color.default);
26
- return res + `"];`;
27
- };
28
- const dotEdge = (a, b, _) => `s${a.id} -> s${b.id}${b.xform ? `[label="xform"]` : ""};`;
29
- const subValue = (sub) => {
30
- const res = JSON.stringify(sub.deref ? sub.deref() : undefined);
31
- return res ? strings.truncate(64, "...")(res) : res;
32
- };
33
- const walk = (subs, opts, state) => {
34
- opts || (opts = {});
35
- state || (state = { id: 0, subs: new Map(), rels: [] });
36
- for (let sub of subs) {
37
- if (state.subs.get(sub))
38
- return state;
39
- const id = state.id;
40
- const desc = {
41
- id,
42
- label: sub.id || "<noid>",
43
- type: getNodeType(sub),
44
- xform: !!sub.xform,
45
- body: opts.values ? subValue(sub) : undefined,
46
- };
47
- state.subs.set(sub, desc);
48
- state.id++;
49
- const children = sub.subs ||
50
- (sub.__owner ? [sub.__owner] : undefined);
51
- if (children) {
52
- walk(children, opts, state);
53
- for (let c of children) {
54
- const childNode = state.subs.get(c);
55
- childNode && state.rels.push([desc, childNode]);
56
- }
57
- }
58
- }
59
- return state;
60
- };
61
- const toDot = (state, opts) => {
62
- opts = Object.assign({ dir: "TB", font: "sans-serif", fontsize: 10, text: "white" }, opts);
63
- opts.color = Object.assign({ default: "black", noid: "gray", stream: "blue", streammerge: "red", streamsync: "red" }, (opts.color || {}));
64
- return [
65
- "digraph g {",
66
- `rankdir=${opts.dir};`,
67
- `node[fontname="${opts.font}",fontsize=${opts.fontsize},style=filled,fontcolor=${opts.text}];`,
68
- `edge[fontname="${opts.font}",fontsize=${opts.fontsize}];`,
69
- ...transducers.map((n) => dotNode(n, opts), state.subs.values()),
70
- ...transducers.map((r) => dotEdge(r[0], r[1]), state.rels),
71
- "}",
72
- ].join("\n");
73
- };
74
-
75
- exports.toDot = toDot;
76
- exports.walk = walk;
package/lib/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../index.js"],"sourcesContent":null,"names":["Stream","StreamSync","StreamMerge","truncate","map"],"mappings":";;;;;;;;AAIA,MAAM,WAAW,GAAG,CAAC,GAAG,KAAK,GAAG,YAAYA,cAAM;AAClD,MAAM,QAAQ;AACd,MAAM,GAAG,YAAYC,kBAAU;AAC/B,UAAU,YAAY;AACtB,UAAU,GAAG,YAAYC,mBAAW;AACpC,cAAc,aAAa;AAC3B,cAAc,SAAS,CAAC;AACxB,MAAM,OAAO,GAAG,CAAC,CAAC,EAAE,IAAI,KAAK;AAC7B,IAAI,IAAI,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;AACjC,IAAI,GAAG,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;AAC9D,IAAI,IAAI,CAAC,CAAC,IAAI,KAAK,SAAS,EAAE;AAC9B,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAA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eof module?t(exports,require("@thi.ng/rstream"),require("@thi.ng/strings"),require("@thi.ng/transducers")):"function"==typeof define&&define.amd?define(["exports","@thi.ng/rstream","@thi.ng/strings","@thi.ng/transducers"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).thi=e.thi||{},e.thi.ng=e.thi.ng||{},e.thi.ng.rstreamDot={}),e.thi.ng.rstream,e.thi.ng.strings,e.thi.ng.transducers)}(this,(function(e,t,r,n){"use strict";const o=e=>e instanceof t.Stream?"Stream":e instanceof t.StreamSync?"StreamSync":e instanceof t.StreamMerge?"StreamMerge":void 0,s=e=>{const t=JSON.stringify(e.deref?e.deref():void 0);return t?r.truncate(64,"...")(t):t},i=(e,t,r)=>{t||(t={}),r||(r={id:0,subs:new Map,rels:[]});for(let n of e){if(r.subs.get(n))return r;const e={id:r.id,label:n.id||"<noid>",type:o(n),xform:!!n.xform,body:t.values?s(n):void 0};r.subs.set(n,e),r.id++;const a=n.subs||(n.__owner?[n.__owner]:void 0);if(a){i(a,t,r);for(let t of a){const n=r.subs.get(t);n&&r.rels.push([e,n])}}}return r};e.toDot=(e,t)=>((t=Object.assign({dir:"TB",font:"sans-serif",fontsize:10,text:"white"},t)).color=Object.assign({default:"black",noid:"gray",stream:"blue",streammerge:"red",streamsync:"red"},t.color||{}),["digraph g {",`rankdir=${t.dir};`,`node[fontname="${t.font}",fontsize=${t.fontsize},style=filled,fontcolor=${t.text}];`,`edge[fontname="${t.font}",fontsize=${t.fontsize}];`,...n.map((e=>((e,t)=>{let r=`s${e.id}[label="`;return r+=e.type?`${e.label}\\n(${e.type})`:`${e.label}`,void 0!==e.body&&(r+=`\\n${e.body.replace(/"/g,"'").replace(/\n/g,"\\n")}`),r+='", color="',r+=e.type&&t.color[e.type.toLowerCase()]||("<noid>"===e.label?t.color.noid:t.color.default),r+'"];'})(e,t)),e.subs.values()),...n.map((e=>{return t=e[0],r=e[1],`s${t.id} -> s${r.id}${r.xform?'[label="xform"]':""};`;var t,r}),e.rels),"}"].join("\n")),e.walk=i,Object.defineProperty(e,"__esModule",{value:!0})}));
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.umd.js","sources":["../index.js"],"sourcesContent":null,"names":["Stream","StreamSync","StreamMerge","truncate","map"],"mappings":";;;;;;IAIA,MAAM,WAAW,GAAG,CAAC,GAAG,KAAK,GAAG,YAAYA,cAAM;IAClD,MAAM,QAAQ;IACd,MAAM,GAAG,YAAYC,kBAAU;IAC/B,UAAU,YAAY;IACtB,UAAU,GAAG,YAAYC,mBAAW;IACpC,cAAc,aAAa;IAC3B,cAAc,SAAS,CAAC;IACxB,MAAM,OAAO,GAAG,CAAC,CAAC,EAAE,IAAI,KAAK;IAC7B,IAAI,IAAI,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;IACjC,IAAI,GAAG,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9D,IAAI,IAAI,CAAC,CAAC,IAAI,KAAK,SAAS,EAAE;IAC9B,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IACvE,KAAK;IACL,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC;IACxB,IAAI,GAAG;IACP,QAAQ,CAAC,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;IACnD,aAAa,CAAC,CAAC,KAAK,KAAK,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,C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