@meltemi/diagrams-layout 0.0.0-stage → 1.9.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/LICENSE +21 -0
- package/README.md +52 -2
- package/dist/audit.d.ts +58 -0
- package/dist/audit.d.ts.map +1 -0
- package/dist/audit.js +239 -0
- package/dist/audit.js.map +1 -0
- package/dist/checks.d.ts +38 -0
- package/dist/checks.d.ts.map +1 -0
- package/dist/checks.js +331 -0
- package/dist/checks.js.map +1 -0
- package/dist/constraints.d.ts +20 -0
- package/dist/constraints.d.ts.map +1 -0
- package/dist/constraints.js +149 -0
- package/dist/constraints.js.map +1 -0
- package/dist/engine.d.ts +96 -0
- package/dist/engine.d.ts.map +1 -0
- package/dist/engine.js +3 -0
- package/dist/engine.js.map +1 -0
- package/dist/frame.d.ts +17 -0
- package/dist/frame.d.ts.map +1 -0
- package/dist/frame.js +51 -0
- package/dist/frame.js.map +1 -0
- package/dist/free.d.ts +75 -0
- package/dist/free.d.ts.map +1 -0
- package/dist/free.js +122 -0
- package/dist/free.js.map +1 -0
- package/dist/geometry.d.ts +58 -0
- package/dist/geometry.d.ts.map +1 -0
- package/dist/geometry.js +223 -0
- package/dist/geometry.js.map +1 -0
- package/dist/icons.d.ts +16 -0
- package/dist/icons.d.ts.map +1 -0
- package/dist/icons.js +94 -0
- package/dist/icons.js.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/layout.d.ts +206 -0
- package/dist/layout.d.ts.map +1 -0
- package/dist/layout.js +3527 -0
- package/dist/layout.js.map +1 -0
- package/dist/mark.d.ts +24 -0
- package/dist/mark.d.ts.map +1 -0
- package/dist/mark.js +60 -0
- package/dist/mark.js.map +1 -0
- package/dist/markers.d.ts +62 -0
- package/dist/markers.d.ts.map +1 -0
- package/dist/markers.js +255 -0
- package/dist/markers.js.map +1 -0
- package/dist/measure.d.ts +38 -0
- package/dist/measure.d.ts.map +1 -0
- package/dist/measure.js +44 -0
- package/dist/measure.js.map +1 -0
- package/dist/messages/en.d.ts +160 -0
- package/dist/messages/en.d.ts.map +1 -0
- package/dist/messages/en.js +163 -0
- package/dist/messages/en.js.map +1 -0
- package/dist/messages/es.d.ts +4 -0
- package/dist/messages/es.d.ts.map +1 -0
- package/dist/messages/es.js +104 -0
- package/dist/messages/es.js.map +1 -0
- package/dist/messages/index.d.ts +86 -0
- package/dist/messages/index.d.ts.map +1 -0
- package/dist/messages/index.js +17 -0
- package/dist/messages/index.js.map +1 -0
- package/dist/routing.d.ts +94 -0
- package/dist/routing.d.ts.map +1 -0
- package/dist/routing.js +549 -0
- package/dist/routing.js.map +1 -0
- package/dist/scene.d.ts +220 -0
- package/dist/scene.d.ts.map +1 -0
- package/dist/scene.js +5 -0
- package/dist/scene.js.map +1 -0
- package/dist/sequence.d.ts +17 -0
- package/dist/sequence.d.ts.map +1 -0
- package/dist/sequence.js +875 -0
- package/dist/sequence.js.map +1 -0
- package/dist/shapes.d.ts +140 -0
- package/dist/shapes.d.ts.map +1 -0
- package/dist/shapes.js +1030 -0
- package/dist/shapes.js.map +1 -0
- package/dist/styles.d.ts +58 -0
- package/dist/styles.d.ts.map +1 -0
- package/dist/styles.js +106 -0
- package/dist/styles.js.map +1 -0
- package/dist/text.d.ts +8 -0
- package/dist/text.d.ts.map +1 -0
- package/dist/text.js +28 -0
- package/dist/text.js.map +1 -0
- package/dist/theme.d.ts +100 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +246 -0
- package/dist/theme.js.map +1 -0
- package/dist/viewport.d.ts +98 -0
- package/dist/viewport.d.ts.map +1 -0
- package/dist/viewport.js +177 -0
- package/dist/viewport.js.map +1 -0
- package/package.json +49 -3
package/dist/icons.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
const round = (value) => Math.round(value * 1000) / 1000;
|
|
2
|
+
/**
|
|
3
|
+
* Turns resolved icons into scene groups. Each icon instance gets its own gradient ids, so two
|
|
4
|
+
* icons with gradients of the same name never clash in one SVG.
|
|
5
|
+
*/
|
|
6
|
+
export class IconPainter {
|
|
7
|
+
gradients = [];
|
|
8
|
+
count = 0;
|
|
9
|
+
/**
|
|
10
|
+
* The icon drawn in a square of `size` whose top-left corner is (x, y): its view box scaled by
|
|
11
|
+
* the pack's optical scale and centred in the square. Monochrome paints take `color`.
|
|
12
|
+
*/
|
|
13
|
+
draw(icon, x, y, size, color) {
|
|
14
|
+
const instance = ++this.count;
|
|
15
|
+
const { viewBox } = icon.geometry;
|
|
16
|
+
const drawn = size * icon.scale;
|
|
17
|
+
const scale = drawn / Math.max(viewBox.width, viewBox.height);
|
|
18
|
+
const tx = x + (size - viewBox.width * scale) / 2 - viewBox.x * scale;
|
|
19
|
+
const ty = y + (size - viewBox.height * scale) / 2 - viewBox.y * scale;
|
|
20
|
+
const ids = new Map();
|
|
21
|
+
for (const gradient of icon.geometry.gradients) {
|
|
22
|
+
const id = `icon-${instance}-${gradient.id}`;
|
|
23
|
+
ids.set(gradient.id, id);
|
|
24
|
+
this.gradients.push(sceneGradient(gradient, id));
|
|
25
|
+
}
|
|
26
|
+
const paint = (value) => {
|
|
27
|
+
switch (value.kind) {
|
|
28
|
+
case "none":
|
|
29
|
+
return "none";
|
|
30
|
+
case "current":
|
|
31
|
+
return color;
|
|
32
|
+
case "color":
|
|
33
|
+
return value.value;
|
|
34
|
+
case "gradient":
|
|
35
|
+
return `url(#${ids.get(value.id) ?? value.id})`;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const items = icon.geometry.paths.map((path) => ({
|
|
39
|
+
kind: "path",
|
|
40
|
+
d: path.d,
|
|
41
|
+
fill: paint(path.fill),
|
|
42
|
+
stroke: paint(path.stroke),
|
|
43
|
+
strokeWidth: path.stroke.kind === "none" ? 0 : path.strokeWidth,
|
|
44
|
+
dashed: false,
|
|
45
|
+
...(path.lineCap === "round" || path.lineJoin === "round" ? { rounded: true } : {}),
|
|
46
|
+
...(path.transform ? { transform: path.transform } : {}),
|
|
47
|
+
...(path.opacity < 1 ? { opacity: path.opacity } : {}),
|
|
48
|
+
...(path.fillOpacity < 1 ? { fillOpacity: path.fillOpacity } : {}),
|
|
49
|
+
...(path.strokeOpacity < 1 ? { strokeOpacity: path.strokeOpacity } : {}),
|
|
50
|
+
...(path.fillRule === "evenodd" ? { fillRule: "evenodd" } : {}),
|
|
51
|
+
}));
|
|
52
|
+
return {
|
|
53
|
+
kind: "group",
|
|
54
|
+
id: icon.reference,
|
|
55
|
+
role: "icon",
|
|
56
|
+
transform: `translate(${round(tx)} ${round(ty)}) scale(${round(scale)})`,
|
|
57
|
+
items,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function sceneGradient(gradient, id) {
|
|
62
|
+
const common = {
|
|
63
|
+
id,
|
|
64
|
+
units: gradient.units,
|
|
65
|
+
...(gradient.transform ? { transform: gradient.transform } : {}),
|
|
66
|
+
...(gradient.spread !== "pad" ? { spread: gradient.spread } : {}),
|
|
67
|
+
stops: gradient.stops.map((stop) => ({
|
|
68
|
+
offset: stop.offset,
|
|
69
|
+
color: stop.color,
|
|
70
|
+
...(stop.opacity < 1 ? { opacity: stop.opacity } : {}),
|
|
71
|
+
})),
|
|
72
|
+
};
|
|
73
|
+
const c = gradient.coordinates;
|
|
74
|
+
if (gradient.kind === "linear") {
|
|
75
|
+
return {
|
|
76
|
+
kind: "linear",
|
|
77
|
+
...common,
|
|
78
|
+
x1: c.x1 ?? "0%",
|
|
79
|
+
y1: c.y1 ?? "0%",
|
|
80
|
+
x2: c.x2 ?? "100%",
|
|
81
|
+
y2: c.y2 ?? "0%",
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
return {
|
|
85
|
+
kind: "radial",
|
|
86
|
+
...common,
|
|
87
|
+
...(c.cx !== undefined ? { cx: c.cx } : {}),
|
|
88
|
+
...(c.cy !== undefined ? { cy: c.cy } : {}),
|
|
89
|
+
...(c.r !== undefined ? { r: c.r } : {}),
|
|
90
|
+
...(c.fx !== undefined ? { fx: c.fx } : {}),
|
|
91
|
+
...(c.fy !== undefined ? { fy: c.fy } : {}),
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=icons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.js","sourceRoot":"","sources":["../src/icons.ts"],"names":[],"mappings":"AAGA,MAAM,KAAK,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;AAEjE;;;GAGG;AACH,MAAM,OAAO,WAAW;IACb,SAAS,GAAoB,EAAE,CAAC;IACjC,KAAK,GAAG,CAAC,CAAC;IAElB;;;OAGG;IACH,IAAI,CAAC,IAAkB,EAAE,CAAS,EAAE,CAAS,EAAE,IAAY,EAAE,KAAa;QACxE,MAAM,QAAQ,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC;QAC9B,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC;QAClC,MAAM,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC;QAChC,MAAM,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;QAC9D,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,KAAK,CAAC;QACtE,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,KAAK,CAAC;QACvE,MAAM,GAAG,GAAG,IAAI,GAAG,EAAkB,CAAC;QACtC,KAAK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AS,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACxC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3C,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC5C,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const PACKAGE_NAME = "@meltemi/diagrams-layout";
|
|
2
|
+
export type * from "./scene.js";
|
|
3
|
+
export * from "./theme.js";
|
|
4
|
+
export * from "./geometry.js";
|
|
5
|
+
export * from "./markers.js";
|
|
6
|
+
export { strokeDash } from "./scene.js";
|
|
7
|
+
export { MELTEMI_MARK, MARK_GRADIENT_ID, markGradient, markGroup } from "./mark.js";
|
|
8
|
+
export { estimateTextWidth, splitLines } from "./text.js";
|
|
9
|
+
export { MIN_TEXT_MARGIN, TEXT_PADDING, TextMetrics, estimateMeasurer, type TextMeasurer, } from "./measure.js";
|
|
10
|
+
export { c4TypeLine, c4TypeName, layoutDiagram, typeScale, DEFAULT_SIZES, DOCUMENT_MAX_WIDTH, PATTERN_SIZE, SLIDE_SIZE, type LayoutOptions, type LayoutResult, type ConnectorGeometry, type TypeScale, } from "./layout.js";
|
|
11
|
+
export { StyleResolver, themeColor, type PatternKind, type ResolvedStyle } from "./styles.js";
|
|
12
|
+
export { CORNERED_POLYGONS, CORNERED_SHAPES, SHAPE_SIZES, onOutline, onPolygon, pointInPolygon, pointInShape, segmentCrossesShape, shapeMagnets, shapeOutline, shapeTextArea, shapeTextCenter, turnPoint, turnedOutline, type BoxShape, type ShapeMagnet, type ShapeOptions, type ShapeOutline, type ShapeSize, } from "./shapes.js";
|
|
13
|
+
export { groupHeaderOf, isUntitledGroup, type FrameTheme } from "./free.js";
|
|
14
|
+
export * from "./engine.js";
|
|
15
|
+
export { solveConstraints, type ConstraintConflict, type SolverBox } from "./constraints.js";
|
|
16
|
+
export { checkComposition, stacked, type CheckedConnector } from "./checks.js";
|
|
17
|
+
export { auditLabels, type LabelProblem, type PlacedText } from "./audit.js";
|
|
18
|
+
export { LANE_SPACING, anchorPoints, bezierThrough, orthogonalize, portPoint, type ConnectorEnd, } from "./routing.js";
|
|
19
|
+
export { drawingWords } from "./messages/index.js";
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,6BAA6B,CAAC;AAEvD,mBAAmB,YAAY,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EACL,eAAe,EACf,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,KAAK,YAAY,GAClB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,UAAU,EACV,UAAU,EACV,aAAa,EACb,SAAS,EACT,aAAa,EACb,kBAAkB,EAClB,YAAY,EACZ,UAAU,EACV,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,SAAS,GACf,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,KAAK,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAC9F,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,SAAS,EACT,SAAS,EACT,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,eAAe,EACf,SAAS,EACT,aAAa,EACb,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,SAAS,GACf,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5E,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,KAAK,kBAAkB,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7F,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7E,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,aAAa,EACb,SAAS,EACT,KAAK,YAAY,GAClB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export const PACKAGE_NAME = "@meltemi/diagrams-layout";
|
|
2
|
+
export * from "./theme.js";
|
|
3
|
+
export * from "./geometry.js";
|
|
4
|
+
export * from "./markers.js";
|
|
5
|
+
export { strokeDash } from "./scene.js";
|
|
6
|
+
export { MELTEMI_MARK, MARK_GRADIENT_ID, markGradient, markGroup } from "./mark.js";
|
|
7
|
+
export { estimateTextWidth, splitLines } from "./text.js";
|
|
8
|
+
export { MIN_TEXT_MARGIN, TEXT_PADDING, TextMetrics, estimateMeasurer, } from "./measure.js";
|
|
9
|
+
export { c4TypeLine, c4TypeName, layoutDiagram, typeScale, DEFAULT_SIZES, DOCUMENT_MAX_WIDTH, PATTERN_SIZE, SLIDE_SIZE, } from "./layout.js";
|
|
10
|
+
export { StyleResolver, themeColor } from "./styles.js";
|
|
11
|
+
export { CORNERED_POLYGONS, CORNERED_SHAPES, SHAPE_SIZES, onOutline, onPolygon, pointInPolygon, pointInShape, segmentCrossesShape, shapeMagnets, shapeOutline, shapeTextArea, shapeTextCenter, turnPoint, turnedOutline, } from "./shapes.js";
|
|
12
|
+
export { groupHeaderOf, isUntitledGroup } from "./free.js";
|
|
13
|
+
export * from "./engine.js";
|
|
14
|
+
export { solveConstraints } from "./constraints.js";
|
|
15
|
+
export { checkComposition, stacked } from "./checks.js";
|
|
16
|
+
export { auditLabels } from "./audit.js";
|
|
17
|
+
export { LANE_SPACING, anchorPoints, bezierThrough, orthogonalize, portPoint, } from "./routing.js";
|
|
18
|
+
export { drawingWords } from "./messages/index.js";
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG,0BAA0B,CAAC;AAGvD,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EACL,eAAe,EACf,YAAY,EACZ,WAAW,EACX,gBAAgB,GAEjB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,UAAU,EACV,UAAU,EACV,aAAa,EACb,SAAS,EACT,aAAa,EACb,kBAAkB,EAClB,YAAY,EACZ,UAAU,GAKX,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,UAAU,EAAwC,MAAM,aAAa,CAAC;AAC9F,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,SAAS,EACT,SAAS,EACT,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,eAAe,EACf,SAAS,EACT,aAAa,GAMd,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,eAAe,EAAmB,MAAM,WAAW,CAAC;AAC5E,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAA2C,MAAM,kBAAkB,CAAC;AAC7F,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAyB,MAAM,aAAa,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAsC,MAAM,YAAY,CAAC;AAC7E,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,aAAa,EACb,SAAS,GAEV,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/layout.d.ts
ADDED
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { type Locale } from "@meltemi/diagrams-i18n";
|
|
2
|
+
import { type IconResolver, type ImageResolver } from "@meltemi/diagrams-assets";
|
|
3
|
+
import type { Diagnostic, LineIndex } from "@meltemi/diagrams-language";
|
|
4
|
+
import type { Compilation, Element, ElementKind, FlowDiagram, LayoutMode, Point, ThemeDefinition } from "@meltemi/diagrams-model";
|
|
5
|
+
import { type LayoutEngine } from "./engine.js";
|
|
6
|
+
import { type Box } from "./geometry.js";
|
|
7
|
+
import { type GroupItem, type Scene } from "./scene.js";
|
|
8
|
+
import { TextMetrics, type TextMeasurer } from "./measure.js";
|
|
9
|
+
import { type BoxShape } from "./shapes.js";
|
|
10
|
+
import { type Theme } from "./theme.js";
|
|
11
|
+
export interface LayoutOptions {
|
|
12
|
+
/** Theme name that overrides the diagram's `theme` property. */
|
|
13
|
+
readonly theme?: string | null;
|
|
14
|
+
/** Theme used when the diagram has no `theme` property, such as the project's default theme. */
|
|
15
|
+
readonly defaultTheme?: string | null;
|
|
16
|
+
/**
|
|
17
|
+
* Theme definitions to resolve names against instead of the file's own themes; projects pass the
|
|
18
|
+
* scope from `themeDefinitionsFor(file)` so imported themes resolve.
|
|
19
|
+
*/
|
|
20
|
+
readonly themes?: readonly ThemeDefinition[];
|
|
21
|
+
/** Measures text; defaults to estimates. Hosts with fonts pass `@meltemi/diagrams-fonts`. */
|
|
22
|
+
readonly measurer?: TextMeasurer;
|
|
23
|
+
/** Resolves `icon` references; without it icons are not drawn. Projects pass their registry. */
|
|
24
|
+
readonly icons?: IconResolver;
|
|
25
|
+
/** Arranges `auto` and `assisted` diagrams; without it they render only when fully placed. */
|
|
26
|
+
readonly engine?: LayoutEngine;
|
|
27
|
+
/**
|
|
28
|
+
* Lays out as if the diagram's `layout` were this mode. The `layout` command arranges the
|
|
29
|
+
* unplaced elements with `assisted` and every element with `auto`.
|
|
30
|
+
*/
|
|
31
|
+
readonly layout?: LayoutMode;
|
|
32
|
+
/**
|
|
33
|
+
* Resolves the paths of `image` objects, relative to the diagram's file. Without it, or for a
|
|
34
|
+
* file that cannot be read, a placeholder is drawn and `layout.image-unavailable` is reported.
|
|
35
|
+
*/
|
|
36
|
+
readonly images?: ImageResolver;
|
|
37
|
+
/** Sequence diagrams: lays out one scenario instead of every event. */
|
|
38
|
+
readonly scenario?: string;
|
|
39
|
+
/**
|
|
40
|
+
* The language of the words the layout adds to the drawing (the type lines of C4 entities):
|
|
41
|
+
* the project's `locale` or an export's. English by default; never the machine's language.
|
|
42
|
+
*/
|
|
43
|
+
readonly locale?: Locale;
|
|
44
|
+
}
|
|
45
|
+
export interface LayoutResult {
|
|
46
|
+
readonly scene: Scene | null;
|
|
47
|
+
readonly diagnostics: readonly Diagnostic[];
|
|
48
|
+
/**
|
|
49
|
+
* Boxes of the elements and groups in diagram coordinates, where `place` statements live, when
|
|
50
|
+
* there is a scene. The scene itself is moved to make room for margins and the frame.
|
|
51
|
+
*/
|
|
52
|
+
readonly boxes?: ReadonlyMap<string, Box>;
|
|
53
|
+
/** Scene coordinates minus diagram coordinates, when there is a scene. */
|
|
54
|
+
readonly offset?: Point;
|
|
55
|
+
/** Label pills of the relations that have one, by relation key, in diagram coordinates. */
|
|
56
|
+
readonly labels?: ReadonlyMap<string, Box>;
|
|
57
|
+
/** The route of every relation, by relation key, in diagram coordinates. */
|
|
58
|
+
readonly connectors?: ReadonlyMap<string, ConnectorGeometry>;
|
|
59
|
+
/**
|
|
60
|
+
* Free diagrams: the interior origin of the parent group of every group child, in diagram
|
|
61
|
+
* coordinates. A child's written `place` is its centre minus this origin. Empty for flow.
|
|
62
|
+
*/
|
|
63
|
+
readonly origins?: ReadonlyMap<string, Point>;
|
|
64
|
+
/** The resolved theme the diagram was laid out with, when there is a scene. */
|
|
65
|
+
readonly theme?: Theme;
|
|
66
|
+
/** Sequence diagrams: the row band of every event by key, in diagram coordinates. */
|
|
67
|
+
readonly events?: ReadonlyMap<string, {
|
|
68
|
+
readonly y: number;
|
|
69
|
+
readonly height: number;
|
|
70
|
+
}>;
|
|
71
|
+
/**
|
|
72
|
+
* The drawn shape of every element box but groups', when there is a scene: the `shape` of a free
|
|
73
|
+
* box or a flow node, a decision's diamond, a data store's cylinder, a C4 person's person, a
|
|
74
|
+
* tag's pill, and `rounded` for the others. Hosts pass it with the box to `shapeOutline`,
|
|
75
|
+
* `onOutline`, `shapeMagnets` and `pointInShape`. Absent for sequence diagrams.
|
|
76
|
+
*/
|
|
77
|
+
readonly shapes?: ReadonlyMap<string, BoxShape>;
|
|
78
|
+
/**
|
|
79
|
+
* The label of every element that draws it outside its box (`shape icon`), by element id, in
|
|
80
|
+
* diagram coordinates: from the top of its first line to the descenders of its last. The box in
|
|
81
|
+
* `boxes` stays the icon's square, which connectors, magnets, handles and selection use; the
|
|
82
|
+
* element's extent, which the engine and derived groups use, is the union of both, and the
|
|
83
|
+
* composition checks take the square and the label as two rectangles. Absent for sequence
|
|
84
|
+
* diagrams.
|
|
85
|
+
*/
|
|
86
|
+
readonly elementLabels?: ReadonlyMap<string, Box>;
|
|
87
|
+
/**
|
|
88
|
+
* The angle of every turned element, clockwise in degrees about the centre of its box in
|
|
89
|
+
* `boxes`, which stays its unturned box (decision 0045).
|
|
90
|
+
*/
|
|
91
|
+
readonly rotations?: ReadonlyMap<string, number>;
|
|
92
|
+
/**
|
|
93
|
+
* The corner radius every element with corners is drawn with, its `ShapeOptions.radius`, for
|
|
94
|
+
* hosts that draw its outline, magnets and hit tests with `shapeOutline` and its relatives.
|
|
95
|
+
*/
|
|
96
|
+
readonly radii?: ReadonlyMap<string, number>;
|
|
97
|
+
}
|
|
98
|
+
/** Where a relation is drawn, for editors. */
|
|
99
|
+
export interface ConnectorGeometry {
|
|
100
|
+
/** The route from the source anchor to the target anchor, before the arrowhead is cut out. */
|
|
101
|
+
readonly points: readonly Point[];
|
|
102
|
+
/**
|
|
103
|
+
* The polyline the connector is drawn with, the heads cut out: a Bézier route's samples, the
|
|
104
|
+
* rounded corners, the elbows of a detour.
|
|
105
|
+
*/
|
|
106
|
+
readonly line: readonly Point[];
|
|
107
|
+
readonly fromSide: "north" | "south" | "east" | "west";
|
|
108
|
+
readonly toSide: "north" | "south" | "east" | "west";
|
|
109
|
+
/** The waypoints written in the relation's `route` and used for drawing. */
|
|
110
|
+
readonly via: readonly Point[];
|
|
111
|
+
}
|
|
112
|
+
/** Widest content canvas of `preset document` before `layout.too-large`. */
|
|
113
|
+
export declare const DOCUMENT_MAX_WIDTH = 1200;
|
|
114
|
+
/** The 16:9 canvas of `preset slide`. */
|
|
115
|
+
export declare const SLIDE_SIZE: {
|
|
116
|
+
readonly width: 1920;
|
|
117
|
+
readonly height: 1080;
|
|
118
|
+
};
|
|
119
|
+
/** Size of one pattern tile in pixels. */
|
|
120
|
+
export declare const PATTERN_SIZE = 8;
|
|
121
|
+
/** Default box sizes of the `technical.*` type scale (13 px labels); others scale with `labelSize`. */
|
|
122
|
+
export declare const DEFAULT_SIZES: Readonly<Record<ElementKind, {
|
|
123
|
+
width: number;
|
|
124
|
+
height: number;
|
|
125
|
+
} | null>>;
|
|
126
|
+
/**
|
|
127
|
+
* The type line of a C4 entity in the content language: `[Container: React]`, `[Contenedor: React]`.
|
|
128
|
+
* The content language is explicit (English by default), never the interface's.
|
|
129
|
+
*/
|
|
130
|
+
export declare function c4TypeLine(element: Element, locale?: Locale): string | null;
|
|
131
|
+
/**
|
|
132
|
+
* The type word of a C4 entity in the content language, as its type line draws it without the
|
|
133
|
+
* brackets and the technology: `Container`, `External Software System`, `Contenedor`. Null for
|
|
134
|
+
* the boundary group and for elements that draw no entity.
|
|
135
|
+
*/
|
|
136
|
+
export declare function c4TypeName(element: Pick<Element, "entity" | "kind" | "external">, locale?: Locale): string | null;
|
|
137
|
+
/** Type sizes, line heights and frame measures derived from a theme's type tokens. */
|
|
138
|
+
export interface TypeScale {
|
|
139
|
+
readonly label: number;
|
|
140
|
+
readonly labelWeight: number;
|
|
141
|
+
readonly description: number;
|
|
142
|
+
readonly descriptionLine: number;
|
|
143
|
+
readonly groupTitle: number;
|
|
144
|
+
readonly note: number;
|
|
145
|
+
readonly noteLine: number;
|
|
146
|
+
readonly tag: number;
|
|
147
|
+
readonly tagHeight: number;
|
|
148
|
+
readonly tagPadding: number;
|
|
149
|
+
readonly relationLabel: number;
|
|
150
|
+
readonly relationLabelHeight: number;
|
|
151
|
+
readonly relationLabelPadding: number;
|
|
152
|
+
readonly frameBrand: number;
|
|
153
|
+
readonly frameTitle: number;
|
|
154
|
+
readonly frameHeight: number;
|
|
155
|
+
readonly frameMark: number;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Derives line heights and pill sizes from the type tokens. The ratios are those of the
|
|
159
|
+
* `technical.*` themes: 11 px descriptions on 16 px lines, 18 px tags at 10.5 px, a 44 px frame
|
|
160
|
+
* at 12 px.
|
|
161
|
+
*/
|
|
162
|
+
export declare function typeScale(theme: Theme): TypeScale;
|
|
163
|
+
/**
|
|
164
|
+
* The visible pieces of a polyline that passes under `holes`: the parts inside a hole are left
|
|
165
|
+
* out. A line no hole touches is one piece.
|
|
166
|
+
*/
|
|
167
|
+
export declare function splitAround(line: readonly Point[], holes: readonly Box[]): Point[][];
|
|
168
|
+
/**
|
|
169
|
+
* Lays out one compiled diagram into a scene, then checks that no label is cut or overlaps
|
|
170
|
+
* another label, a box or a connector (`layout.label-cut`, `layout.label-overlap`).
|
|
171
|
+
*/
|
|
172
|
+
export declare function layoutDiagram(compilation: Compilation, diagram: FlowDiagram, options?: LayoutOptions): LayoutResult;
|
|
173
|
+
/** Moves path data made of absolute coordinate pairs (`M` and `C` commands) by (dx, dy). */
|
|
174
|
+
/** The group of an element with the element's `url`, when it has one. */
|
|
175
|
+
export declare function withUrl(group: GroupItem, element: Pick<Element, "url">): GroupItem;
|
|
176
|
+
/**
|
|
177
|
+
* The group with the box it was drawn in, for motion effects. The corner radius is the one of the
|
|
178
|
+
* outline drawn on that box, when there is one. `inner` is the inscribed rectangle the text of a
|
|
179
|
+
* shape other than a box lies in, and `label` the box of a label drawn outside it, for the label
|
|
180
|
+
* audit.
|
|
181
|
+
*/
|
|
182
|
+
export declare function withBounds(group: GroupItem, box: Box, inner?: Box, label?: Box): GroupItem;
|
|
183
|
+
/**
|
|
184
|
+
* The canvas for the diagram's `preset` or `canvas`, reporting `layout.too-large` when the content
|
|
185
|
+
* canvas exceeds what the preset holds. Nothing is clipped: a fixed canvas grows to fit.
|
|
186
|
+
*/
|
|
187
|
+
export declare function canvasSize(diagram: FlowDiagram, width: number, height: number, lines: LineIndex, diagnostics: Diagnostic[]): {
|
|
188
|
+
width: number;
|
|
189
|
+
height: number;
|
|
190
|
+
};
|
|
191
|
+
/** Width the frame needs for the mark, the brand text and the title without overlap. */
|
|
192
|
+
export declare function frameMinWidth(theme: Theme, scale: TypeScale, title: string | null, metrics: TextMetrics): number;
|
|
193
|
+
/** How a centred icon and its label share an element's box (`iconPosition center`). */
|
|
194
|
+
export interface CentredLayout {
|
|
195
|
+
/** The rectangle they share: the box, or the largest rectangle inscribed in the shape. */
|
|
196
|
+
readonly content: Box;
|
|
197
|
+
/** The room kept around the icon and between the label and the content's edge. */
|
|
198
|
+
readonly margin: number;
|
|
199
|
+
/** The band of the label at the `labelPosition` edge; empty when there is no text. */
|
|
200
|
+
readonly band: Box;
|
|
201
|
+
/** The icon's square, centred in the rest of the content. */
|
|
202
|
+
readonly icon: Box;
|
|
203
|
+
/** Whether the label's lines fit the band. */
|
|
204
|
+
readonly fits: boolean;
|
|
205
|
+
}
|
|
206
|
+
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../src/layout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,aAAa,EAGnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,UAAU,EAAoB,SAAS,EAAS,MAAM,4BAA4B,CAAC;AAOjG,OAAO,KAAK,EACV,WAAW,EACX,OAAO,EACP,WAAW,EACX,WAAW,EAEX,UAAU,EACV,KAAK,EAOL,eAAe,EAChB,MAAM,yBAAyB,CAAC;AAKjC,OAAO,EAKL,KAAK,YAAY,EAClB,MAAM,aAAa,CAAC;AAerB,OAAO,EAQL,KAAK,GAAG,EAET,MAAM,eAAe,CAAC;AAiBvB,OAAO,EAEL,KAAK,SAAS,EAEd,KAAK,KAAK,EAMX,MAAM,YAAY,CAAC;AACpB,OAAO,EAAmB,WAAW,EAAoB,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AACjG,OAAO,EAcL,KAAK,QAAQ,EAGd,MAAM,aAAa,CAAC;AAGrB,OAAO,EAML,KAAK,K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