@dxos/react-ui-graph 0.8.3 → 0.8.4-main.03d5cd7b56
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/README.md +5 -7
- package/dist/lib/browser/chunk-EASNZZ7B.mjs +52 -0
- package/dist/lib/browser/chunk-EASNZZ7B.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1109 -319
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +19 -19
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/lib/node-esm/chunk-JSE2X4ML.mjs +54 -0
- package/dist/lib/node-esm/chunk-JSE2X4ML.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +1109 -319
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +19 -19
- package/dist/lib/node-esm/testing/index.mjs.map +3 -3
- package/dist/types/src/components/Graph/Graph.d.ts +4 -5
- package/dist/types/src/components/Graph/Graph.d.ts.map +1 -1
- package/dist/types/src/components/Graph/Graph.stories.d.ts +21 -12
- package/dist/types/src/components/Graph/Graph.stories.d.ts.map +1 -1
- package/dist/types/src/components/Mesh/Mesh.d.ts.map +1 -1
- package/dist/types/src/components/Mesh/Mesh.stories.d.ts +10 -6
- package/dist/types/src/components/Mesh/Mesh.stories.d.ts.map +1 -1
- package/dist/types/src/components/SVG/Grid.d.ts.map +1 -1
- package/dist/types/src/components/SVG/Markers.d.ts.map +1 -1
- package/dist/types/src/components/SVG/Root.d.ts +4 -4
- package/dist/types/src/components/SVG/Root.d.ts.map +1 -1
- package/dist/types/src/components/SVG/SVG.d.ts +14 -17
- package/dist/types/src/components/SVG/SVG.d.ts.map +1 -1
- package/dist/types/src/components/SVG/Svg.stories.d.ts +11 -9
- package/dist/types/src/components/SVG/Svg.stories.d.ts.map +1 -1
- package/dist/types/src/components/SVG/Zoom.d.ts.map +1 -1
- package/dist/types/src/fx/fx.stories.d.ts +16 -15
- package/dist/types/src/fx/fx.stories.d.ts.map +1 -1
- package/dist/types/src/fx/pulsar.d.ts.map +1 -1
- package/dist/types/src/graph/markers.d.ts.map +1 -1
- package/dist/types/src/graph/projector/graph-drag.d.ts +1 -1
- package/dist/types/src/graph/projector/graph-drag.d.ts.map +1 -1
- package/dist/types/src/graph/projector/graph-force-projector.d.ts +2 -2
- package/dist/types/src/graph/projector/graph-force-projector.d.ts.map +1 -1
- package/dist/types/src/graph/projector/graph-forces.d.ts.map +1 -1
- package/dist/types/src/graph/projector/graph-hierarchical-projector.d.ts +2 -2
- package/dist/types/src/graph/projector/graph-hierarchical-projector.d.ts.map +1 -1
- package/dist/types/src/graph/projector/graph-projector.d.ts +4 -4
- package/dist/types/src/graph/projector/graph-projector.d.ts.map +1 -1
- package/dist/types/src/graph/projector/graph-radial-projector.d.ts +2 -2
- package/dist/types/src/graph/projector/graph-radial-projector.d.ts.map +1 -1
- package/dist/types/src/graph/projector/graph-relational-projector.d.ts +2 -2
- package/dist/types/src/graph/projector/graph-relational-projector.d.ts.map +1 -1
- package/dist/types/src/graph/projector/projector.d.ts.map +1 -1
- package/dist/types/src/graph/renderer/bullets.d.ts.map +1 -1
- package/dist/types/src/graph/renderer/graph-renderer.d.ts +1 -1
- package/dist/types/src/graph/renderer/graph-renderer.d.ts.map +1 -1
- package/dist/types/src/graph/renderer/renderer.d.ts.map +1 -1
- package/dist/types/src/graph/types.d.ts +1 -1
- package/dist/types/src/graph/types.d.ts.map +1 -1
- package/dist/types/src/hooks/useGrid.d.ts.map +1 -1
- package/dist/types/src/hooks/useStateRef.d.ts.map +1 -1
- package/dist/types/src/hooks/useSvgContext.d.ts.map +1 -1
- package/dist/types/src/hooks/useZoom.d.ts.map +1 -1
- package/dist/types/src/stories/hooks.stories.d.ts +15 -10
- package/dist/types/src/stories/hooks.stories.d.ts.map +1 -1
- package/dist/types/src/testing/data.d.ts +5 -5
- package/dist/types/src/testing/data.d.ts.map +1 -1
- package/dist/types/src/testing/hooks.d.ts +2 -16
- package/dist/types/src/testing/hooks.d.ts.map +1 -1
- package/dist/types/src/testing/model.d.ts +4 -8
- package/dist/types/src/testing/model.d.ts.map +1 -1
- package/dist/types/src/util/events.d.ts.map +1 -1
- package/dist/types/src/util/fraction.d.ts +1 -1
- package/dist/types/src/util/fraction.d.ts.map +1 -1
- package/dist/types/src/util/index.d.ts +2 -2
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/dist/types/src/util/points.d.ts.map +1 -1
- package/dist/types/src/util/scale.d.ts.map +1 -1
- package/dist/types/src/util/screen.d.ts +1 -1
- package/dist/types/src/util/screen.d.ts.map +1 -1
- package/dist/types/src/util/vector.d.ts +1 -1
- package/dist/types/src/util/vector.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +32 -34
- package/src/components/Graph/Graph.stories.tsx +73 -69
- package/src/components/Graph/Graph.tsx +25 -20
- package/src/components/Mesh/Mesh.stories.tsx +10 -9
- package/src/components/Mesh/Mesh.tsx +1 -1
- package/src/components/SVG/Grid.tsx +2 -2
- package/src/components/SVG/Markers.tsx +1 -1
- package/src/components/SVG/Root.tsx +14 -7
- package/src/components/SVG/SVG.tsx +13 -4
- package/src/components/SVG/Svg.stories.tsx +23 -19
- package/src/components/SVG/Zoom.tsx +1 -1
- package/src/fx/fx.stories.tsx +18 -15
- package/src/graph/projector/graph-drag.ts +1 -1
- package/src/graph/projector/graph-force-projector.ts +3 -3
- package/src/graph/projector/graph-forces.ts +1 -1
- package/src/graph/projector/graph-hierarchical-projector.ts +4 -4
- package/src/graph/projector/graph-projector.ts +5 -5
- package/src/graph/projector/graph-radial-projector.ts +3 -3
- package/src/graph/projector/graph-relational-projector.ts +4 -4
- package/src/graph/projector/projector.ts +1 -1
- package/src/graph/renderer/bullets.ts +1 -1
- package/src/graph/renderer/graph-renderer.ts +7 -7
- package/src/graph/renderer/renderer.ts +1 -1
- package/src/graph/types.ts +1 -1
- package/src/hooks/useStateRef.ts +1 -1
- package/src/hooks/useZoom.ts +1 -1
- package/src/stories/hooks.stories.tsx +43 -36
- package/src/testing/data.ts +14 -14
- package/src/testing/hooks.ts +5 -5
- package/src/testing/model.ts +6 -6
- package/src/util/fraction.ts +1 -1
- package/src/util/index.ts +2 -2
- package/src/util/screen.test.ts +1 -1
- package/src/util/screen.ts +1 -1
- package/src/util/vector.ts +1 -1
- package/styles/graph.css +292 -43
- package/dist/lib/browser/chunk-2YMRPQU7.mjs +0 -979
- package/dist/lib/browser/chunk-2YMRPQU7.mjs.map +0 -7
- package/dist/lib/node/chunk-WFHWEMPB.cjs +0 -919
- package/dist/lib/node/chunk-WFHWEMPB.cjs.map +0 -7
- package/dist/lib/node/index.cjs +0 -1547
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node/testing/index.cjs +0 -214
- package/dist/lib/node/testing/index.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-ITHTKQOY.mjs +0 -981
- package/dist/lib/node-esm/chunk-ITHTKQOY.mjs.map +0 -7
package/src/testing/data.ts
CHANGED
|
@@ -2,28 +2,28 @@
|
|
|
2
2
|
// Copyright 2020 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { type
|
|
6
|
-
import {
|
|
5
|
+
import { type Graph } from '@dxos/graph';
|
|
6
|
+
import { random } from '@dxos/random';
|
|
7
7
|
|
|
8
8
|
import { type TestNode } from './model';
|
|
9
9
|
|
|
10
|
-
// https://www.npmjs.com/package/
|
|
11
|
-
export const seed = (seed: number) =>
|
|
10
|
+
// https://www.npmjs.com/package/random#setting-a-randomness-seed
|
|
11
|
+
export const seed = (seed: number) => random.seed(seed);
|
|
12
12
|
|
|
13
13
|
//
|
|
14
14
|
// Create data.
|
|
15
15
|
//
|
|
16
16
|
|
|
17
17
|
export const createNode = (type: string = undefined): TestNode => ({
|
|
18
|
-
id:
|
|
18
|
+
id: random.string.uuid(),
|
|
19
19
|
type,
|
|
20
|
-
label:
|
|
20
|
+
label: random.lorem.words(3).replace(/ /g, '-'),
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
export const createNodes = (n = 0, types?: string[]): TestNode[] =>
|
|
24
|
-
Array.from({ length: n }, () => createNode(types ?
|
|
24
|
+
Array.from({ length: n }, () => createNode(types ? random.helpers.arrayElement(types) : undefined));
|
|
25
25
|
|
|
26
|
-
export const createEdge = (source: TestNode, target: TestNode):
|
|
26
|
+
export const createEdge = (source: TestNode, target: TestNode): Graph.Edge.Any => ({
|
|
27
27
|
id: `${source.id}-${target.id}`,
|
|
28
28
|
source: source.id,
|
|
29
29
|
target: target.id,
|
|
@@ -38,7 +38,7 @@ export const createTree = ({ depth = 2, children = 3 } = {}): TestNode => {
|
|
|
38
38
|
const createChildren = (root: TestNode, d = 0) => {
|
|
39
39
|
if (d < depth) {
|
|
40
40
|
const max = Math.round(Math.log(depth + 1 - d) * children);
|
|
41
|
-
const num =
|
|
41
|
+
const num = random.number.int({ min: 1, max });
|
|
42
42
|
root.children = [...new Array(num)].map(() => {
|
|
43
43
|
return createChildren(createNode(), d + 1);
|
|
44
44
|
});
|
|
@@ -54,8 +54,8 @@ export const createTree = ({ depth = 2, children = 3 } = {}): TestNode => {
|
|
|
54
54
|
* Converts a tree into a graph.
|
|
55
55
|
* @param root
|
|
56
56
|
*/
|
|
57
|
-
export const convertTreeToGraph = (root: TestNode): Graph => {
|
|
58
|
-
const traverse = (node: TestNode, graph: Graph) => {
|
|
57
|
+
export const convertTreeToGraph = (root: TestNode): Graph.Any => {
|
|
58
|
+
const traverse = (node: TestNode, graph: Graph.Any) => {
|
|
59
59
|
graph.nodes.push(node);
|
|
60
60
|
node.children?.forEach((child) => {
|
|
61
61
|
graph.edges.push(createEdge(node, child));
|
|
@@ -76,14 +76,14 @@ export const convertTreeToGraph = (root: TestNode): Graph => {
|
|
|
76
76
|
* @param numNodes
|
|
77
77
|
* @param numEdges
|
|
78
78
|
*/
|
|
79
|
-
export const createGraph = (numNodes = 0, numEdges = 0, types?: string[]): Graph => {
|
|
79
|
+
export const createGraph = (numNodes = 0, numEdges = 0, types?: string[]): Graph.Any => {
|
|
80
80
|
const nodes = createNodes(numNodes, types);
|
|
81
81
|
|
|
82
82
|
const edges = new Map();
|
|
83
83
|
if (numEdges && nodes.length >= 2) {
|
|
84
84
|
for (let i = 0; i < numEdges; i++) {
|
|
85
|
-
const source =
|
|
86
|
-
const target =
|
|
85
|
+
const source = random.helpers.arrayElement(nodes);
|
|
86
|
+
const target = random.helpers.arrayElement(nodes);
|
|
87
87
|
if (source.id !== target.id) {
|
|
88
88
|
const edge = createEdge(source, target);
|
|
89
89
|
if (!edges.get(edge.id)) {
|
package/src/testing/hooks.ts
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
import update from 'immutability-helper';
|
|
6
6
|
|
|
7
7
|
import { type Graph } from '@dxos/graph';
|
|
8
|
-
import {
|
|
8
|
+
import { random } from '@dxos/random';
|
|
9
9
|
|
|
10
|
-
import { createNode, createEdge } from './data';
|
|
11
|
-
import { type TestNode } from './model';
|
|
12
10
|
import { useStateRef } from '../hooks';
|
|
11
|
+
import { createEdge, createNode } from './data';
|
|
12
|
+
import { type TestNode } from './model';
|
|
13
13
|
|
|
14
14
|
export type ObjectMutator<T> = [
|
|
15
15
|
T, // Current value.
|
|
@@ -46,13 +46,13 @@ export const useObjectMutator = <T>(initalValue: T): ObjectMutator<T> => {
|
|
|
46
46
|
/**
|
|
47
47
|
* Test data set generator and mutator.
|
|
48
48
|
*/
|
|
49
|
-
export const useGraphGenerator = (options: { data?: Graph } = {}) => {
|
|
49
|
+
export const useGraphGenerator = (options: { data?: Graph.Any } = {}) => {
|
|
50
50
|
const [data, setData, updateData] = useObjectMutator(options.data || { nodes: [], edges: [] });
|
|
51
51
|
|
|
52
52
|
let interval;
|
|
53
53
|
|
|
54
54
|
const mutator = () => {
|
|
55
|
-
const parent = data.nodes.length ?
|
|
55
|
+
const parent = data.nodes.length ? random.helpers.arrayElement(data.nodes) : undefined;
|
|
56
56
|
const node = createNode();
|
|
57
57
|
|
|
58
58
|
updateData({
|
package/src/testing/model.ts
CHANGED
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { type
|
|
6
|
-
import {
|
|
5
|
+
import { type Graph, GraphModel } from '@dxos/graph';
|
|
6
|
+
import { random } from '@dxos/random';
|
|
7
7
|
|
|
8
8
|
import { createEdge, createNode } from './data';
|
|
9
9
|
|
|
10
|
-
export type TestNode =
|
|
10
|
+
export type TestNode = Graph.Node.Any & {
|
|
11
11
|
label?: string;
|
|
12
12
|
children?: TestNode[];
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
export class TestGraphModel extends ReactiveGraphModel<TestNode> {
|
|
15
|
+
export class TestGraphModel extends GraphModel.ReactiveGraphModel<TestNode> {
|
|
16
16
|
getRandomNode() {
|
|
17
|
-
return
|
|
17
|
+
return random.helpers.arrayElement(this._graph.nodes);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
createNodes(node: TestNode = undefined, n = 1): void {
|
|
21
21
|
Array.from({ length: n }).forEach(() => {
|
|
22
22
|
const child = this.addNode(createNode());
|
|
23
|
-
const parent = node ||
|
|
23
|
+
const parent = node || random.helpers.arrayElement(this._graph.nodes);
|
|
24
24
|
if (parent) {
|
|
25
25
|
this.addEdge(createEdge(parent, child));
|
|
26
26
|
}
|
package/src/util/fraction.ts
CHANGED
package/src/util/index.ts
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
// Copyright 2021 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
export * from './d3-types';
|
|
5
|
+
export type * from './d3-types';
|
|
6
6
|
export * from './events';
|
|
7
7
|
export * from './fraction';
|
|
8
8
|
export * from './points';
|
|
9
9
|
export * from './scale';
|
|
10
10
|
export * from './screen';
|
|
11
|
-
export * from './types';
|
|
11
|
+
export type * from './types';
|
|
12
12
|
export * from './vector';
|
package/src/util/screen.test.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { expect, test } from 'vitest';
|
|
6
6
|
|
|
7
7
|
import { Screen } from './screen';
|
|
8
|
-
import { type
|
|
8
|
+
import { type Point, type Rect } from './types';
|
|
9
9
|
|
|
10
10
|
test('createBounds', () => {
|
|
11
11
|
const tests: { p1: Point; p2: Point; bounds: Rect }[] = [
|
package/src/util/screen.ts
CHANGED
package/src/util/vector.ts
CHANGED
package/styles/graph.css
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
/* TODO(burdon): Move into theme? */
|
|
2
|
+
@reference "../../ui-theme/src/main.css";
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
5
|
* Graph styles.
|
|
3
6
|
*/
|
|
4
7
|
|
|
5
|
-
/* TODO(burdon): Implement light/dark theme or use semantic tokens. */
|
|
8
|
+
/* TODO(burdon): Implement light/dark theme or use semantic tokens. light-dark. */
|
|
6
9
|
|
|
7
10
|
svg {
|
|
8
11
|
marker {
|
|
@@ -17,37 +20,65 @@ svg {
|
|
|
17
20
|
|
|
18
21
|
g.dx-grid {
|
|
19
22
|
path.dx-axis {
|
|
20
|
-
@apply stroke-neutral-
|
|
23
|
+
@apply stroke-neutral-300;
|
|
24
|
+
|
|
25
|
+
.dark & {
|
|
26
|
+
@apply stroke-neutral-800;
|
|
27
|
+
}
|
|
21
28
|
}
|
|
22
29
|
path.dx-major {
|
|
23
|
-
@apply stroke-neutral-
|
|
30
|
+
@apply stroke-neutral-200;
|
|
31
|
+
|
|
32
|
+
.dark & {
|
|
33
|
+
@apply stroke-neutral-900;
|
|
34
|
+
}
|
|
24
35
|
}
|
|
25
36
|
path.dx-minor {
|
|
26
|
-
@apply stroke-neutral-
|
|
37
|
+
@apply stroke-neutral-200;
|
|
38
|
+
|
|
39
|
+
.dark & {
|
|
40
|
+
@apply stroke-neutral-950;
|
|
41
|
+
}
|
|
27
42
|
}
|
|
28
|
-
}
|
|
43
|
+
}
|
|
29
44
|
|
|
30
45
|
g.dx-graph {
|
|
31
46
|
g.dx-guides {
|
|
32
47
|
circle {
|
|
33
|
-
@apply fill-neutral-
|
|
48
|
+
@apply fill-neutral-400 stroke-neutral-600 opacity-10;
|
|
49
|
+
|
|
50
|
+
.dark & {
|
|
51
|
+
@apply fill-neutral-800 stroke-neutral-950;
|
|
52
|
+
}
|
|
34
53
|
}
|
|
35
54
|
}
|
|
36
55
|
|
|
37
56
|
g.dx-subgraphs {
|
|
38
57
|
path.dx-subgraph {
|
|
39
|
-
@apply stroke-red-500 fill-neutral-
|
|
58
|
+
@apply stroke-red-500 fill-neutral-200 [stroke-dasharray:4_4];
|
|
59
|
+
|
|
60
|
+
.dark & {
|
|
61
|
+
@apply fill-neutral-950;
|
|
62
|
+
}
|
|
40
63
|
}
|
|
41
64
|
}
|
|
42
65
|
|
|
43
66
|
g.dx-nodes {
|
|
44
67
|
g.dx-node {
|
|
45
68
|
circle {
|
|
46
|
-
@apply fill-neutral-
|
|
69
|
+
@apply fill-neutral-300 stroke-neutral-800;
|
|
70
|
+
|
|
71
|
+
.dark & {
|
|
72
|
+
@apply fill-neutral-600 stroke-none;
|
|
73
|
+
}
|
|
47
74
|
}
|
|
48
75
|
&.dx-selected {
|
|
49
76
|
circle {
|
|
50
|
-
@apply !fill-red-500 stroke-2 stroke-neutral-
|
|
77
|
+
@apply !fill-red-500 stroke-2 stroke-neutral-950;
|
|
78
|
+
|
|
79
|
+
.dark & {
|
|
80
|
+
@apply stroke-neutral-300;
|
|
81
|
+
}
|
|
51
82
|
}
|
|
52
83
|
}
|
|
53
84
|
|
|
@@ -56,26 +87,135 @@ svg {
|
|
|
56
87
|
}
|
|
57
88
|
}
|
|
58
89
|
|
|
59
|
-
g[data-color=
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
g[data-color=
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
90
|
+
g[data-color='orange'].dx-node {
|
|
91
|
+
circle {
|
|
92
|
+
@apply fill-orange-300;
|
|
93
|
+
.dark & {
|
|
94
|
+
@apply fill-orange-500;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
g[data-color='amber'].dx-node {
|
|
99
|
+
circle {
|
|
100
|
+
@apply fill-amber-300;
|
|
101
|
+
.dark & {
|
|
102
|
+
@apply fill-amber-500;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
g[data-color='yellow'].dx-node {
|
|
107
|
+
circle {
|
|
108
|
+
@apply fill-yellow-300;
|
|
109
|
+
.dark & {
|
|
110
|
+
@apply fill-yellow-500;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
g[data-color='lime'].dx-node {
|
|
115
|
+
circle {
|
|
116
|
+
@apply fill-lime-300;
|
|
117
|
+
.dark & {
|
|
118
|
+
@apply fill-lime-500;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
g[data-color='green'].dx-node {
|
|
123
|
+
circle {
|
|
124
|
+
@apply fill-green-300;
|
|
125
|
+
.dark & {
|
|
126
|
+
@apply fill-green-500;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
g[data-color='emerald'].dx-node {
|
|
131
|
+
circle {
|
|
132
|
+
@apply fill-emerald-300;
|
|
133
|
+
.dark & {
|
|
134
|
+
@apply fill-emerald-500;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
g[data-color='teal'].dx-node {
|
|
139
|
+
circle {
|
|
140
|
+
@apply fill-teal-300;
|
|
141
|
+
.dark & {
|
|
142
|
+
@apply fill-teal-500;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
g[data-color='cyan'].dx-node {
|
|
147
|
+
circle {
|
|
148
|
+
@apply fill-cyan-300;
|
|
149
|
+
.dark & {
|
|
150
|
+
@apply fill-cyan-500;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
g[data-color='sky'].dx-node {
|
|
155
|
+
circle {
|
|
156
|
+
@apply fill-sky-300;
|
|
157
|
+
.dark & {
|
|
158
|
+
@apply fill-sky-500;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
g[data-color='indigo'].dx-node {
|
|
163
|
+
circle {
|
|
164
|
+
@apply fill-indigo-300;
|
|
165
|
+
.dark & {
|
|
166
|
+
@apply fill-indigo-500;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
g[data-color='violet'].dx-node {
|
|
171
|
+
circle {
|
|
172
|
+
@apply fill-violet-300;
|
|
173
|
+
.dark & {
|
|
174
|
+
@apply fill-violet-500;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
g[data-color='purple'].dx-node {
|
|
179
|
+
circle {
|
|
180
|
+
@apply fill-purple-300;
|
|
181
|
+
.dark & {
|
|
182
|
+
@apply fill-purple-500;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
g[data-color='fuchsia'].dx-node {
|
|
187
|
+
circle {
|
|
188
|
+
@apply fill-fuchsia-300;
|
|
189
|
+
.dark & {
|
|
190
|
+
@apply fill-fuchsia-500;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
g[data-color='rose'].dx-node {
|
|
195
|
+
circle {
|
|
196
|
+
@apply fill-rose-300;
|
|
197
|
+
.dark & {
|
|
198
|
+
@apply fill-rose-500;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
g[data-color='pink'].dx-node {
|
|
203
|
+
circle {
|
|
204
|
+
@apply fill-pink-300;
|
|
205
|
+
.dark & {
|
|
206
|
+
@apply fill-pink-500;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
74
210
|
|
|
75
211
|
g.dx-dragging,
|
|
76
212
|
g.dx-highlight {
|
|
77
213
|
circle {
|
|
78
|
-
@apply stroke-2 stroke-neutral-900
|
|
214
|
+
@apply stroke-2 stroke-neutral-900 cursor-pointer;
|
|
215
|
+
|
|
216
|
+
.dark & {
|
|
217
|
+
@apply stroke-neutral-200;
|
|
218
|
+
}
|
|
79
219
|
}
|
|
80
220
|
|
|
81
221
|
g.dx-label {
|
|
@@ -85,10 +225,10 @@ svg {
|
|
|
85
225
|
@apply stroke-2 stroke-neutral-500;
|
|
86
226
|
}
|
|
87
227
|
rect {
|
|
88
|
-
@apply stroke-1 stroke-neutral-500 fill-
|
|
228
|
+
@apply stroke-1 stroke-neutral-500 fill-inverse-surface;
|
|
89
229
|
}
|
|
90
230
|
text {
|
|
91
|
-
@apply fill-
|
|
231
|
+
@apply fill-inverse-surface-text;
|
|
92
232
|
}
|
|
93
233
|
}
|
|
94
234
|
}
|
|
@@ -98,7 +238,11 @@ svg {
|
|
|
98
238
|
g.dx-edge {
|
|
99
239
|
path {
|
|
100
240
|
/** NOTE: Set text- so that current color is picked up by marker. */
|
|
101
|
-
@apply stroke-1 stroke-neutral-700
|
|
241
|
+
@apply stroke-1 stroke-neutral-700;
|
|
242
|
+
|
|
243
|
+
.dark & {
|
|
244
|
+
@apply stroke-neutral-700;
|
|
245
|
+
}
|
|
102
246
|
}
|
|
103
247
|
|
|
104
248
|
&.dx-dashed {
|
|
@@ -108,21 +252,126 @@ svg {
|
|
|
108
252
|
}
|
|
109
253
|
}
|
|
110
254
|
|
|
111
|
-
g[data-color=
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
g[data-color=
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
255
|
+
g[data-color='orange'].dx-edge {
|
|
256
|
+
path {
|
|
257
|
+
@apply stroke-orange-300;
|
|
258
|
+
.dark & {
|
|
259
|
+
@apply stroke-orange-500;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
g[data-color='amber'].dx-edge {
|
|
264
|
+
path {
|
|
265
|
+
@apply stroke-amber-300;
|
|
266
|
+
.dark & {
|
|
267
|
+
@apply stroke-amber-500;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
g[data-color='yellow'].dx-edge {
|
|
272
|
+
path {
|
|
273
|
+
@apply stroke-yellow-300;
|
|
274
|
+
.dark & {
|
|
275
|
+
@apply stroke-yellow-500;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
g[data-color='lime'].dx-edge {
|
|
280
|
+
path {
|
|
281
|
+
@apply stroke-lime-300;
|
|
282
|
+
.dark & {
|
|
283
|
+
@apply stroke-lime-500;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
g[data-color='green'].dx-edge {
|
|
288
|
+
path {
|
|
289
|
+
@apply stroke-green-300;
|
|
290
|
+
.dark & {
|
|
291
|
+
@apply stroke-green-500;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
g[data-color='emerald'].dx-edge {
|
|
296
|
+
path {
|
|
297
|
+
@apply stroke-emerald-300;
|
|
298
|
+
.dark & {
|
|
299
|
+
@apply stroke-emerald-500;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
g[data-color='teal'].dx-edge {
|
|
304
|
+
path {
|
|
305
|
+
@apply stroke-teal-300;
|
|
306
|
+
.dark & {
|
|
307
|
+
@apply stroke-teal-500;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
g[data-color='cyan'].dx-edge {
|
|
312
|
+
path {
|
|
313
|
+
@apply stroke-cyan-300;
|
|
314
|
+
.dark & {
|
|
315
|
+
@apply stroke-cyan-500;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
g[data-color='sky'].dx-edge {
|
|
320
|
+
path {
|
|
321
|
+
@apply stroke-sky-300;
|
|
322
|
+
.dark & {
|
|
323
|
+
@apply stroke-sky-500;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
g[data-color='indigo'].dx-edge {
|
|
328
|
+
path {
|
|
329
|
+
@apply stroke-indigo-300;
|
|
330
|
+
.dark & {
|
|
331
|
+
@apply stroke-indigo-500;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
g[data-color='violet'].dx-edge {
|
|
336
|
+
path {
|
|
337
|
+
@apply stroke-violet-300;
|
|
338
|
+
.dark & {
|
|
339
|
+
@apply stroke-violet-500;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
g[data-color='purple'].dx-edge {
|
|
344
|
+
path {
|
|
345
|
+
@apply stroke-purple-300;
|
|
346
|
+
.dark & {
|
|
347
|
+
@apply stroke-purple-500;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
g[data-color='fuchsia'].dx-edge {
|
|
352
|
+
path {
|
|
353
|
+
@apply stroke-fuchsia-300;
|
|
354
|
+
.dark & {
|
|
355
|
+
@apply stroke-fuchsia-500;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
g[data-color='rose'].dx-edge {
|
|
360
|
+
path {
|
|
361
|
+
@apply stroke-rose-300;
|
|
362
|
+
.dark & {
|
|
363
|
+
@apply stroke-rose-500;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
g[data-color='pink'].dx-edge {
|
|
368
|
+
path {
|
|
369
|
+
@apply stroke-pink-300;
|
|
370
|
+
.dark & {
|
|
371
|
+
@apply stroke-pink-500;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
126
375
|
}
|
|
127
376
|
|
|
128
377
|
.dx-linker {
|