@ts-graphviz/core 0.0.0-pr956-20240225073457 → 0.0.0-pr956-20240225091623
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 +3 -3
- package/package.json +39 -16
- package/src/attribute.ts +0 -18
- package/src/core.ts +0 -5
- package/src/from-dot.ts +0 -73
- package/src/model-factory/index.ts +0 -2
- package/src/model-factory/model-factory-builder.test.ts +0 -79
- package/src/model-factory/model-factory-builder.ts +0 -55
- package/src/model-factory/model-factory.test.ts +0 -61
- package/src/model-factory/model-factory.ts +0 -40
- package/src/model-factory/types.ts +0 -46
- package/src/models/AttributeList.spec.ts +0 -58
- package/src/models/AttributeList.ts +0 -32
- package/src/models/AttributesBase.spec.ts +0 -79
- package/src/models/AttributesBase.ts +0 -62
- package/src/models/AttributesGroup.spec.ts +0 -18
- package/src/models/AttributesGroup.ts +0 -13
- package/src/models/Digraph.spec.ts +0 -17
- package/src/models/Digraph.ts +0 -11
- package/src/models/DotObject.ts +0 -5
- package/src/models/Edge.spec.ts +0 -48
- package/src/models/Edge.ts +0 -40
- package/src/models/Graph.spec.ts +0 -18
- package/src/models/Graph.ts +0 -11
- package/src/models/GraphBase.spec.ts +0 -364
- package/src/models/GraphBase.ts +0 -263
- package/src/models/Node.spec.ts +0 -25
- package/src/models/Node.ts +0 -37
- package/src/models/RootGraph.spec.ts +0 -69
- package/src/models/RootGraph.ts +0 -48
- package/src/models/Subgraph.spec.ts +0 -196
- package/src/models/Subgraph.ts +0 -44
- package/src/models/index.ts +0 -15
- package/src/models/registerModelContext.ts +0 -14
- package/src/to-dot.ts +0 -36
- package/tsconfig.json +0 -8
- package/typedoc.json +0 -4
- package/vite.config.ts +0 -22
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { RootModelsContext } from '@ts-graphviz/common';
|
|
2
|
-
import { Digraph } from './Digraph.js';
|
|
3
|
-
import { Edge } from './Edge.js';
|
|
4
|
-
import { Graph } from './Graph.js';
|
|
5
|
-
import { Node } from './Node.js';
|
|
6
|
-
import { Subgraph } from './Subgraph.js';
|
|
7
|
-
|
|
8
|
-
Object.assign(RootModelsContext, {
|
|
9
|
-
Graph,
|
|
10
|
-
Digraph,
|
|
11
|
-
Subgraph,
|
|
12
|
-
Node,
|
|
13
|
-
Edge,
|
|
14
|
-
});
|
package/src/to-dot.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ConvertFromModelOptions,
|
|
3
|
-
PrintOptions,
|
|
4
|
-
fromModel,
|
|
5
|
-
stringify,
|
|
6
|
-
} from '@ts-graphviz/ast';
|
|
7
|
-
import { DotObjectModel } from '@ts-graphviz/common';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* This interface provides options for converting a model to DOT.
|
|
11
|
-
* @group Convert Model to DOT
|
|
12
|
-
*/
|
|
13
|
-
export interface ToDotOptions {
|
|
14
|
-
/**
|
|
15
|
-
* Options for converting the model to DOT.
|
|
16
|
-
*/
|
|
17
|
-
convert?: ConvertFromModelOptions;
|
|
18
|
-
/**
|
|
19
|
-
* Options for printing DOT.
|
|
20
|
-
*/
|
|
21
|
-
print?: PrintOptions;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Convert Model to DOT string.
|
|
26
|
-
*
|
|
27
|
-
* @group Convert Model to DOT
|
|
28
|
-
*
|
|
29
|
-
* @param model Dot Object Model, like {@link Digraph}, {@link Graph}, {@link Subgraph}, {@link Node}, and {@link Edge}
|
|
30
|
-
* @param options Optional options for the conversion.
|
|
31
|
-
* @returns DOT string
|
|
32
|
-
*/
|
|
33
|
-
export function toDot(model: DotObjectModel, options?: ToDotOptions): string {
|
|
34
|
-
const ast = fromModel(model, options?.convert);
|
|
35
|
-
return stringify(ast, options?.print);
|
|
36
|
-
}
|
package/tsconfig.json
DELETED
package/typedoc.json
DELETED
package/vite.config.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import dts from 'vite-plugin-dts';
|
|
2
|
-
import { defineConfig } from 'vitest/config';
|
|
3
|
-
|
|
4
|
-
export default defineConfig({
|
|
5
|
-
build: {
|
|
6
|
-
outDir: './lib',
|
|
7
|
-
minify: false,
|
|
8
|
-
lib: {
|
|
9
|
-
entry: './src/core.ts',
|
|
10
|
-
formats: ['es', 'cjs'],
|
|
11
|
-
},
|
|
12
|
-
rollupOptions: {
|
|
13
|
-
external: ['@ts-graphviz/common', '@ts-graphviz/ast'],
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
plugins: [
|
|
17
|
-
dts({
|
|
18
|
-
outDir: './lib',
|
|
19
|
-
rollupTypes: true,
|
|
20
|
-
}),
|
|
21
|
-
],
|
|
22
|
-
});
|