reladraw 0.0.1 → 0.2.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.
@@ -0,0 +1,22 @@
1
+ import type { Document } from './ast.js';
2
+ import { type Measurer } from './measure.js';
3
+ import type { Layout } from './model.js';
4
+ export interface ResolveOptions {
5
+ measurer?: Measurer;
6
+ fontSize?: number;
7
+ /** Blank space kept around the whole diagram. */
8
+ margin?: number;
9
+ }
10
+ /**
11
+ * Turn a parsed document into solved geometry.
12
+ *
13
+ * Three passes: build the containment tree, size every node bottom-up, then
14
+ * turn each node's placements into minimum distances and solve for the tightest
15
+ * arrangement that satisfies them. That last pass also adds the separations
16
+ * that keep boxes off each other, and solves again until none is left to add.
17
+ *
18
+ * It is a constraint solve, of the kind that computes rather than searches. It
19
+ * works out how far apart things are; nothing about which side of what a node
20
+ * sits on is ever decided here, because the author wrote it down.
21
+ */
22
+ export declare function resolve(doc: Document, options?: ResolveOptions): Layout;