ts-graphviz 1.8.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/CHANGELOG.md +307 -0
  2. package/README.md +40 -13
  3. package/lib/adapter.cjs +1 -0
  4. package/lib/adapter.d.ts +1 -0
  5. package/lib/adapter.js +1 -0
  6. package/lib/ast.cjs +1 -0
  7. package/lib/ast.d.ts +1 -0
  8. package/lib/ast.js +1 -0
  9. package/lib/attribute.d.ts +2 -0
  10. package/lib/from-dot.d.ts +10 -0
  11. package/lib/model-factory-builder.d.ts +7 -0
  12. package/lib/model-factory.d.ts +6 -0
  13. package/lib/to-dot.d.ts +7 -0
  14. package/lib/ts-graphviz.cjs +1 -0
  15. package/lib/ts-graphviz.d.ts +7 -0
  16. package/lib/ts-graphviz.js +55 -0
  17. package/lib/types.d.ts +14 -0
  18. package/package.json +53 -96
  19. package/SECURITY.md +0 -5
  20. package/lib/adapter/browser/index.cjs +0 -12
  21. package/lib/adapter/browser/index.d.ts +0 -15
  22. package/lib/adapter/browser/index.js +0 -9
  23. package/lib/adapter/deno/mod.d.ts +0 -13
  24. package/lib/adapter/deno/mod.js +0 -36
  25. package/lib/adapter/node/index.cjs +0 -45
  26. package/lib/adapter/node/index.d.ts +0 -15
  27. package/lib/adapter/node/index.js +0 -42
  28. package/lib/adapter/types/index.cjs +0 -1
  29. package/lib/adapter/types/index.d.ts +0 -134
  30. package/lib/adapter/types/index.js +0 -0
  31. package/lib/adapter/utils/index.cjs +0 -58
  32. package/lib/adapter/utils/index.d.ts +0 -11
  33. package/lib/adapter/utils/index.js +0 -56
  34. package/lib/ast/index.cjs +0 -5775
  35. package/lib/ast/index.d.ts +0 -946
  36. package/lib/ast/index.js +0 -5770
  37. package/lib/common/index.cjs +0 -58
  38. package/lib/common/index.d.ts +0 -4981
  39. package/lib/common/index.js +0 -58
  40. package/lib/core/index.cjs +0 -359
  41. package/lib/core/index.d.ts +0 -347
  42. package/lib/core/index.js +0 -364
  43. package/lib/index.cjs +0 -23
  44. package/lib/index.d.ts +0 -3
  45. package/lib/index.js +0 -2
  46. package/lib/utils/index.cjs +0 -41
  47. package/lib/utils/index.d.ts +0 -34
  48. package/lib/utils/index.js +0 -37
package/lib/index.cjs DELETED
@@ -1,23 +0,0 @@
1
- 'use strict';
2
-
3
- var index_js = require('./common/index.cjs');
4
- var index_js$1 = require('./core/index.cjs');
5
-
6
- Object.keys(index_js).forEach(function (k) {
7
- if (k !== 'default' && !exports.hasOwnProperty(k))
8
- Object.defineProperty(exports, k, {
9
- enumerable: true,
10
- get: function () {
11
- return index_js[k];
12
- },
13
- });
14
- });
15
- Object.keys(index_js$1).forEach(function (k) {
16
- if (k !== 'default' && !exports.hasOwnProperty(k))
17
- Object.defineProperty(exports, k, {
18
- enumerable: true,
19
- get: function () {
20
- return index_js$1[k];
21
- },
22
- });
23
- });
package/lib/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export { $keywords } from './utils/index.js';
2
- export * from './common/index.js';
3
- export * from './core/index.js';
package/lib/index.js DELETED
@@ -1,2 +0,0 @@
1
- export * from './common/index.js';
2
- export * from './core/index.js';
@@ -1,41 +0,0 @@
1
- 'use strict';
2
-
3
- function _pipe(...args) {
4
- const [o1, ...operations] = args;
5
- return (...t) => operations.reduce((acc, f) => f(acc), o1(...t));
6
- }
7
- function pipe(o1, ...operations) {
8
- return _pipe(o1, ...operations);
9
- }
10
- const defer =
11
- (fn) =>
12
- (...args) =>
13
- (src) =>
14
- fn(src, ...args);
15
- const toIterable = (f) => ({
16
- [Symbol.iterator]: f,
17
- });
18
- const map = defer((src, selector) =>
19
- Array.from(
20
- toIterable(function* () {
21
- for (const v of src) {
22
- yield selector(v);
23
- }
24
- }),
25
- ),
26
- );
27
- const filter = defer((src, pred) =>
28
- Array.from(
29
- toIterable(function* () {
30
- for (const x of src) {
31
- if (pred(x)) {
32
- yield x;
33
- }
34
- }
35
- }),
36
- ),
37
- );
38
-
39
- exports.filter = filter;
40
- exports.map = map;
41
- exports.pipe = pipe;
@@ -1,34 +0,0 @@
1
- /**
2
- * @hidden
3
- */
4
- type $keywords<T extends string> = {
5
- [key in T]: key;
6
- };
7
- /**
8
- * @hidden
9
- */
10
- interface $keywordsValidation
11
- extends $keywords<`${string} ${string}` | `${string}\n${string}` | `${string}\t${string}`> {}
12
-
13
- type F<A extends any[], O> = (...args: A) => O;
14
- type IO<I, O> = F<[I], O>;
15
- declare function pipe<I extends any[], O>(f0: F<I, O>): F<I, O>;
16
- declare function pipe<I extends any[], T1, O>(f0: F<I, T1>, f1: IO<T1, O>): F<I, O>;
17
- declare function pipe<I extends any[], T1, T2, O>(f0: F<I, T1>, f1: IO<T1, T2>, f2: IO<T2, O>): F<I, O>;
18
- declare function pipe<I extends any[], T1, T2, T3, O>(
19
- f0: F<I, T1>,
20
- f1: IO<T1, T2>,
21
- f2: IO<T2, T3>,
22
- f3: IO<T3, O>,
23
- ): F<I, O>;
24
- declare function pipe<I extends any[], T1, T2, T3, T4, O>(
25
- f0: F<I, T1>,
26
- f1: IO<T1, T2>,
27
- f2: IO<T2, T3>,
28
- f3: IO<T3, T4>,
29
- f4: IO<T4, O>,
30
- ): F<I, O>;
31
- declare const map: <T, O>(selector: (item: T) => O) => (src: Iterable<T>) => O[];
32
- declare const filter: <T>(pred: (item: T) => boolean) => (src: Iterable<T>) => T[];
33
-
34
- export { $keywords, $keywordsValidation, F, IO, filter, map, pipe };
@@ -1,37 +0,0 @@
1
- function _pipe(...args) {
2
- const [o1, ...operations] = args;
3
- return (...t) => operations.reduce((acc, f) => f(acc), o1(...t));
4
- }
5
- function pipe(o1, ...operations) {
6
- return _pipe(o1, ...operations);
7
- }
8
- const defer =
9
- (fn) =>
10
- (...args) =>
11
- (src) =>
12
- fn(src, ...args);
13
- const toIterable = (f) => ({
14
- [Symbol.iterator]: f,
15
- });
16
- const map = defer((src, selector) =>
17
- Array.from(
18
- toIterable(function* () {
19
- for (const v of src) {
20
- yield selector(v);
21
- }
22
- }),
23
- ),
24
- );
25
- const filter = defer((src, pred) =>
26
- Array.from(
27
- toIterable(function* () {
28
- for (const x of src) {
29
- if (pred(x)) {
30
- yield x;
31
- }
32
- }
33
- }),
34
- ),
35
- );
36
-
37
- export { filter, map, pipe };