@draftably/runtime 0.5.0 → 0.6.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/assets/render.worker-CDf818A5.js +9040 -0
- package/dist/compile-CvMiDEcR.js +7837 -0
- package/dist/element.js +1 -1
- package/dist/graph.js +1 -1
- package/dist/index.js +2 -2
- package/dist/render-DU-eRw6k.js +1250 -0
- package/dist/types/src/dsl/compile.d.ts +2 -0
- package/dist/types/src/dsl/sequence-layout.d.ts +87 -0
- package/dist/types/src/dsl/syntax.d.ts +8 -2
- package/dist/types/src/engines/layout/arrange.d.ts +36 -0
- package/dist/types/src/engines/layout/compute.d.ts +7 -0
- package/dist/types/src/engines/layout/forces.d.ts +8 -0
- package/dist/types/src/engines/layout/grid.d.ts +10 -0
- package/dist/types/src/engines/layout/intent.d.ts +14 -0
- package/dist/types/src/engines/layout/layered.d.ts +5 -0
- package/dist/types/src/engines/layout/objective.d.ts +6 -0
- package/dist/types/src/engines/layout/packing.d.ts +7 -0
- package/dist/types/src/engines/layout/report.d.ts +7 -0
- package/dist/types/src/engines/layout/scene.d.ts +53 -0
- package/dist/types/src/engines/layout/seed.d.ts +3 -0
- package/dist/types/src/engines/layout/separation.d.ts +17 -0
- package/dist/types/src/engines/layout/settings.d.ts +6 -0
- package/dist/types/src/engines/layout/topology.d.ts +18 -0
- package/dist/types/src/engines/layout/trees.d.ts +8 -0
- package/dist/types/src/engines/layout/types.d.ts +133 -0
- package/dist/types/src/engines/layout/util.d.ts +19 -0
- package/dist/types/src/engines/layout-engine.d.ts +14 -119
- package/dist/types/src/engines/routing/compute.d.ts +6 -0
- package/dist/types/src/engines/routing/conflicts.d.ts +36 -0
- package/dist/types/src/engines/routing/context.d.ts +37 -0
- package/dist/types/src/engines/routing/cost.d.ts +13 -0
- package/dist/types/src/engines/routing/doglegs.d.ts +16 -0
- package/dist/types/src/engines/routing/find.d.ts +6 -0
- package/dist/types/src/engines/routing/geometry.d.ts +24 -0
- package/dist/types/src/engines/routing/heap.d.ts +20 -0
- package/dist/types/src/engines/routing/improve.d.ts +7 -0
- package/dist/types/src/engines/routing/nudge.d.ts +7 -0
- package/dist/types/src/engines/routing/paths.d.ts +8 -0
- package/dist/types/src/engines/routing/planned.d.ts +7 -0
- package/dist/types/src/engines/routing/ports.d.ts +10 -0
- package/dist/types/src/engines/routing/repair.d.ts +9 -0
- package/dist/types/src/engines/routing/score.d.ts +12 -0
- package/dist/types/src/engines/routing/search.d.ts +16 -0
- package/dist/types/src/engines/routing/settings.d.ts +4 -0
- package/dist/types/src/engines/routing/sidepairs.d.ts +20 -0
- package/dist/types/src/engines/routing/tidy-ports.d.ts +13 -0
- package/dist/types/src/engines/routing/tidy.d.ts +10 -0
- package/dist/types/src/engines/routing/tuning.d.ts +9 -0
- package/dist/types/src/engines/routing/types.d.ts +157 -0
- package/dist/types/src/engines/routing-engine.d.ts +19 -107
- package/dist/types/src/model/appearance.d.ts +10 -1
- package/dist/types/src/model/labels.d.ts +23 -0
- package/dist/types/src/model/markers.d.ts +7 -0
- package/dist/types/src/model/note.d.ts +11 -2
- package/dist/types/src/model/routes.d.ts +2 -0
- package/dist/types/src/model/status.d.ts +18 -0
- package/dist/types/src/model/types.d.ts +20 -1
- package/dist/types/src/runtime/svg-renderer.d.ts +3 -2
- package/dist/version-D7YCY2pU.js +4 -0
- package/dist/viewer.js +27 -27
- package/package.json +1 -1
- package/dist/assets/render.worker-D11vTqoO.js +0 -8548
- package/dist/compile-BAIrdu-8.js +0 -7405
- package/dist/render-CsJYFD3o.js +0 -1188
- package/dist/types/src/engines/explorer-engine.d.ts +0 -67
- package/dist/types/src/engines/sculpt-engine.d.ts +0 -71
- package/dist/version-CO7i33cq.js +0 -4
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import type { Diagram, LayoutAlgorithmId, LayoutIntent } from '../model/types.js';
|
|
2
|
-
import type { LayoutReport, LayoutScope } from './layout-engine.js';
|
|
3
|
-
import type { PriorRoute, RouteInput, RoutingResult } from './routing-engine.js';
|
|
4
|
-
|
|
5
|
-
export type ParamValue = string | number | boolean;
|
|
6
|
-
|
|
7
|
-
export interface ParamDefinition {
|
|
8
|
-
name: string;
|
|
9
|
-
values: ParamValue[];
|
|
10
|
-
passOnly?: boolean;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export type ComparisonMode = 'layout' | 'routing';
|
|
14
|
-
export type ComparisonRun = 'rebuild' | 'warm' | 'pass';
|
|
15
|
-
|
|
16
|
-
export interface ComparisonConfig {
|
|
17
|
-
mode: ComparisonMode;
|
|
18
|
-
/** Engines, the suggested routing alternatives, or a grid of parameter values. */
|
|
19
|
-
kind: 'algorithms' | 'routes' | 'parameters';
|
|
20
|
-
algorithm: LayoutAlgorithmId;
|
|
21
|
-
algorithms: LayoutAlgorithmId[];
|
|
22
|
-
axisA: string;
|
|
23
|
-
valuesA: string;
|
|
24
|
-
axisB: string;
|
|
25
|
-
valuesB: string;
|
|
26
|
-
run: ComparisonRun;
|
|
27
|
-
maxIterations: number;
|
|
28
|
-
scope: LayoutScope;
|
|
29
|
-
autoPorts: boolean;
|
|
30
|
-
selected: string[];
|
|
31
|
-
containerId?: string;
|
|
32
|
-
fixedIds: string[];
|
|
33
|
-
intent: LayoutIntent;
|
|
34
|
-
viewport: { w: number; h: number };
|
|
35
|
-
priorRoutes: PriorRoute[];
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export interface CandidateSpec {
|
|
39
|
-
key: string;
|
|
40
|
-
title: string;
|
|
41
|
-
subtitle: string;
|
|
42
|
-
patch: Record<string, ParamValue>;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export interface CandidateResult {
|
|
46
|
-
spec: CandidateSpec;
|
|
47
|
-
document: Diagram;
|
|
48
|
-
report: LayoutReport | null;
|
|
49
|
-
routing: RoutingResult;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export const ExplorerLab: {
|
|
53
|
-
layoutParams: Record<string, ParamDefinition>;
|
|
54
|
-
routeParams: Record<string, ParamDefinition>;
|
|
55
|
-
parseValues(key: string, text: string, mode?: ComparisonMode): ParamValue[];
|
|
56
|
-
effectiveParams(
|
|
57
|
-
algorithm: LayoutAlgorithmId,
|
|
58
|
-
run: ComparisonRun,
|
|
59
|
-
): Record<string, ParamDefinition>;
|
|
60
|
-
specs(config: ComparisonConfig): CandidateSpec[];
|
|
61
|
-
sceneInput(doc: Diagram): RouteInput;
|
|
62
|
-
candidate(
|
|
63
|
-
baseline: Diagram,
|
|
64
|
-
spec: CandidateSpec,
|
|
65
|
-
config: ComparisonConfig,
|
|
66
|
-
): Promise<CandidateResult>;
|
|
67
|
-
};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import type { Diagram, LayoutSettings, NodeGeometry, Point } from '../model/types.js';
|
|
2
|
-
import type { LayoutMetrics, LayoutOptions, LayoutReport } from './layout-engine.js';
|
|
3
|
-
|
|
4
|
-
export type BrushMode = 'tidy' | 'flow' | 'space' | 'restore' | 'protect';
|
|
5
|
-
|
|
6
|
-
export interface BrushSettings {
|
|
7
|
-
radius: number;
|
|
8
|
-
strength: number;
|
|
9
|
-
softness: number;
|
|
10
|
-
step: number;
|
|
11
|
-
mode: BrushMode;
|
|
12
|
-
holdRestored: boolean;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface DabOptions extends Partial<BrushSettings> {
|
|
16
|
-
point?: Point;
|
|
17
|
-
worldRadius?: number;
|
|
18
|
-
reference?: NodeGeometry | null;
|
|
19
|
-
protectedIds?: string[];
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface DabResult {
|
|
23
|
-
document: Diagram;
|
|
24
|
-
weights: Record<string, number>;
|
|
25
|
-
locked: string[];
|
|
26
|
-
moved: string[];
|
|
27
|
-
maxDisplacement: number;
|
|
28
|
-
blocked: boolean;
|
|
29
|
-
attenuation?: number;
|
|
30
|
-
mode: BrushMode;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface TimelineFrame {
|
|
34
|
-
nodes: NodeGeometry;
|
|
35
|
-
iteration: number;
|
|
36
|
-
phase: string;
|
|
37
|
-
metrics: LayoutMetrics;
|
|
38
|
-
index: number;
|
|
39
|
-
moved: number;
|
|
40
|
-
travel: number;
|
|
41
|
-
cumulative: number;
|
|
42
|
-
maxMove: number;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export interface TimelineBookmark {
|
|
46
|
-
index: number;
|
|
47
|
-
title: string;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export interface Timeline {
|
|
51
|
-
schemaVersion: 1;
|
|
52
|
-
kind: 'diagram-studio-journey';
|
|
53
|
-
baseline: Diagram;
|
|
54
|
-
settings: LayoutSettings;
|
|
55
|
-
execution: Record<string, unknown>;
|
|
56
|
-
report: LayoutReport;
|
|
57
|
-
frames: TimelineFrame[];
|
|
58
|
-
finalDocument: Diagram;
|
|
59
|
-
bookmarks: TimelineBookmark[];
|
|
60
|
-
createdAt: string;
|
|
61
|
-
/** Added by the app: routes in effect when the timeline was recorded. */
|
|
62
|
-
routePrior?: unknown[];
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export const SculptLab: {
|
|
66
|
-
defaults: BrushSettings;
|
|
67
|
-
settings(input?: Partial<BrushSettings>): BrushSettings;
|
|
68
|
-
dab(input: Diagram, options?: DabOptions): DabResult;
|
|
69
|
-
journey(input: Diagram, options?: LayoutOptions): Promise<Timeline>;
|
|
70
|
-
lookahead(frames: TimelineFrame[], index: number, pixels?: number, scale?: number): number;
|
|
71
|
-
};
|
package/dist/version-CO7i33cq.js
DELETED