@adecore/diagram 0.53.2 → 0.54.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.
- package/dist/layout.d.ts +1 -1
- package/dist/protocol.js +1 -1
- package/dist/shapes.d.ts +1 -1
- package/dist/svg.d.ts +1 -1
- package/package.json +2 -2
- package/src/layout.ts +1 -1
- package/src/protocol.ts +1 -1
- package/src/reading-order.ts +1 -1
- package/src/shapes.ts +1 -1
- package/src/svg.ts +2 -2
package/dist/layout.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DiagramDocument, DiagramEdge, DiagramNode } from './protocol.ts';
|
|
2
1
|
import { type Point, type Rect } from '@adecore/drawing';
|
|
2
|
+
import type { DiagramDocument, DiagramEdge, DiagramNode } from './protocol.ts';
|
|
3
3
|
export type { Point, Rect } from '@adecore/drawing';
|
|
4
4
|
export interface NodeBox extends Rect {
|
|
5
5
|
id: string;
|
package/dist/protocol.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
1
|
import { DrawingColorSchema, DrawingStrokeStyleSchema } from '@adecore/drawing/protocol';
|
|
2
|
+
import { z } from 'zod';
|
|
3
3
|
/*
|
|
4
4
|
* A diagram is a directed graph with groups, written rather than drawn: the file says what is
|
|
5
5
|
* connected to what and the layout is computed from that. Colors are the drawing palette's names,
|
package/dist/shapes.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DiagramEdgeStyle, DiagramShape } from './protocol.ts';
|
|
2
1
|
import { type EdgeLabelBox, type NodeBox, type Point, type Rect } from './layout.ts';
|
|
2
|
+
import type { DiagramEdgeStyle, DiagramShape } from './protocol.ts';
|
|
3
3
|
export interface ShapePaths {
|
|
4
4
|
body: string;
|
|
5
5
|
detail: string | null;
|
package/dist/svg.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DrawingColor } from '@adecore/drawing/protocol';
|
|
2
|
-
import type { DiagramDocument } from './protocol.ts';
|
|
3
2
|
import { type DiagramLayout } from './layout.ts';
|
|
3
|
+
import type { DiagramDocument } from './protocol.ts';
|
|
4
4
|
export interface DiagramSvgOptions {
|
|
5
5
|
palette?: Record<DrawingColor, string>;
|
|
6
6
|
paper?: Record<DrawingColor, string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adecore/diagram",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.54.0",
|
|
4
4
|
"description": "Directed graph schemas, layered layout, SVG export and reading order.",
|
|
5
5
|
"license": "FSL-1.1-MIT",
|
|
6
6
|
"author": "Bas Milius",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"typescript": "^7.0.2"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@adecore/drawing": "0.
|
|
48
|
+
"@adecore/drawing": "0.54.0",
|
|
49
49
|
"zod": "^4.6.7"
|
|
50
50
|
}
|
|
51
51
|
}
|
package/src/layout.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { DiagramDocument, DiagramEdge, DiagramGroup, DiagramNode, DiagramShape } from './protocol.ts';
|
|
2
1
|
import { centerOf, intersects, roundPoint, type Point, type Rect } from '@adecore/drawing';
|
|
3
2
|
import { placeAcross } from './across.ts';
|
|
4
3
|
import { DUMMY_MARGIN, NODE_MARGIN, bandCode, type Band, type Hop, type Layering, type Unit } from './graph.ts';
|
|
5
4
|
import { orderLayers } from './order.ts';
|
|
5
|
+
import type { DiagramDocument, DiagramEdge, DiagramGroup, DiagramNode, DiagramShape } from './protocol.ts';
|
|
6
6
|
import { routeChannel, type ChannelHop, type ChannelLabel } from './route.ts';
|
|
7
7
|
import { LABEL_LINE, LABEL_SIZE, SUB_LINE, SUB_SIZE, estimateTextWidth, widestLine, wrapText } from './text.ts';
|
|
8
8
|
|
package/src/protocol.ts
CHANGED
package/src/reading-order.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DiagramDocument, DiagramNode } from './protocol.ts';
|
|
2
1
|
import { layersOf } from './layout.ts';
|
|
2
|
+
import type { DiagramDocument, DiagramNode } from './protocol.ts';
|
|
3
3
|
|
|
4
4
|
function nameOf(node: DiagramNode | undefined, id: string): string {
|
|
5
5
|
return node && node.label.trim() !== '' ? node.label : id;
|
package/src/shapes.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DiagramEdgeStyle, DiagramShape } from './protocol.ts';
|
|
2
1
|
import { CYLINDER_LID, EDGE_LABEL_PADDING, type EdgeLabelBox, type NodeBox, type Point, type Rect } from './layout.ts';
|
|
2
|
+
import type { DiagramEdgeStyle, DiagramShape } from './protocol.ts';
|
|
3
3
|
import { LABEL_LINE, LABEL_SIZE, SUB_LINE, SUB_SIZE } from './text.ts';
|
|
4
4
|
|
|
5
5
|
const ROUND_RADIUS = 10;
|
package/src/svg.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { DrawingColor } from '@adecore/drawing/protocol';
|
|
2
|
-
import type { DiagramDocument } from './protocol.ts';
|
|
3
1
|
import { DEFAULT_FONT_STACKS, DEFAULT_PALETTE, DEFAULT_PAPER, escapeXml } from '@adecore/drawing';
|
|
2
|
+
import type { DrawingColor } from '@adecore/drawing/protocol';
|
|
4
3
|
import { GROUP_LABEL_BAND, layoutOf, type DiagramLayout } from './layout.ts';
|
|
4
|
+
import type { DiagramDocument } from './protocol.ts';
|
|
5
5
|
import { arrowHeadPath, dashOf, edgeLabelLinesOf, edgePath, shapePaths, textLinesOf } from './shapes.ts';
|
|
6
6
|
import { SUB_SIZE } from './text.ts';
|
|
7
7
|
|