@likec4/core 1.44.0 → 1.46.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/builder/index.d.mts +15 -13
- package/dist/builder/index.mjs +33 -17
- package/dist/compute-view/index.d.mts +8 -7
- package/dist/compute-view/index.mjs +7 -6
- package/dist/compute-view/relationships-view/index.d.mts +8 -7
- package/dist/compute-view/relationships-view/index.mjs +2 -2
- package/dist/geometry/index.d.mts +109 -0
- package/dist/geometry/index.mjs +328 -0
- package/dist/index.d.mts +29 -7
- package/dist/index.mjs +10 -8
- package/dist/model/connection/deployment/index.d.mts +10 -9
- package/dist/model/connection/deployment/index.mjs +2 -2
- package/dist/model/connection/index.d.mts +11 -10
- package/dist/model/connection/index.mjs +3 -3
- package/dist/model/connection/model/index.d.mts +10 -9
- package/dist/model/connection/model/index.mjs +2 -2
- package/dist/model/index.d.mts +13 -26
- package/dist/model/index.mjs +4 -4
- package/dist/shared/{core.Bv3cd-jC.mjs → core.3ZhnKAlZ.mjs} +9 -5
- package/dist/shared/{core.CKNmSm2W.d.mts → core.5gPDaaG5.d.mts} +9 -15
- package/dist/shared/{core.BnOetIAR.d.mts → core.9U0HL3oG.d.mts} +3 -3
- package/dist/shared/{core.M9ayqQZa.mjs → core.BK-tI3Q3.mjs} +2 -3
- package/dist/shared/{core.DjAM-S6a.d.mts → core.BLG-ADpi.d.mts} +16 -14
- package/dist/shared/core.BPGOjone.d.mts +46 -0
- package/dist/shared/{core.DIE3F6sw.mjs → core.BYdtmqY5.mjs} +1 -2
- package/dist/shared/core.BhNcrwzK.mjs +7 -0
- package/dist/shared/{core.CDOKQTW6.d.mts → core.BkSYCfRg.d.mts} +2 -2
- package/dist/shared/core.BkVA6gjl.mjs +5 -0
- package/dist/shared/{core.5ZQ-r3Oa.d.mts → core.BqtAzeAh.d.mts} +1 -1
- package/dist/shared/{core.DEieYfbG.mjs → core.BspBF3SJ.mjs} +22 -70
- package/dist/shared/{core.BnDbAOR2.d.mts → core.Byj60hH6.d.mts} +3 -3
- package/dist/shared/{core.CR3PmPzr.mjs → core.CBLX4mT8.mjs} +3811 -15032
- package/dist/shared/{core.DX-WYEPA.d.mts → core.CDdf8izT.d.mts} +4 -2
- package/dist/shared/core.CLSZtnFh.mjs +69 -0
- package/dist/shared/{core.bKIs4oDO.mjs → core.CQPEY2wQ.mjs} +5 -4
- package/dist/shared/{core.WwMWeiFL.d.mts → core.CQYL_Z-_.d.mts} +3 -3
- package/dist/shared/{core.6VsRBhGY.mjs → core.CdNCAwq7.mjs} +1 -1
- package/dist/shared/{core.DrUt0Lbi.mjs → core.CmGY9blO.mjs} +198 -291
- package/dist/shared/core.Coi_LOUZ.mjs +7 -0
- package/dist/shared/{core.C_Ni6yHl.mjs → core.D0WZutNd.mjs} +3 -1
- package/dist/shared/{core.DTJYgLXI.d.mts → core.D4Y4U8Lp.d.mts} +3 -3
- package/dist/shared/{core.BMtVqKl7.d.mts → core.DE-g9oFF.d.mts} +22 -46
- package/dist/shared/{core.23WeDKcI.mjs → core.DJpiszim.mjs} +265 -233
- package/dist/shared/{core.h4TqqSC0.mjs → core.DU8pv3Q6.mjs} +71 -1174
- package/dist/shared/{core.CHwVhuc9.mjs → core.DbQpDoJS.mjs} +12 -15
- package/dist/shared/{core.CbsSAn1j.mjs → core.DbfO90vF.mjs} +1 -12
- package/dist/shared/{core.C0Ye2OCr.mjs → core.DqlrMlsf.mjs} +1 -1
- package/dist/shared/core.Qv7vZIwZ.mjs +1282 -0
- package/dist/shared/core.oSV6SRfk.mjs +13 -0
- package/dist/shared/{core.BuQZczj6.mjs → core.om36dXXW.mjs} +5 -2
- package/dist/shared/{core.8mmHFn9g.d.mts → core.or6-EHsb.d.mts} +2 -2
- package/dist/shared/{core.DFCHU59b.mjs → core.xeuDd__E.mjs} +3 -4
- package/dist/styles/index.d.mts +7 -6
- package/dist/styles/index.mjs +4 -4
- package/dist/types/_aux.d.mts +2 -2
- package/dist/types/expression-model.d.mts +3 -3
- package/dist/types/expression.d.mts +3 -3
- package/dist/types/fqnRef.d.mts +2 -2
- package/dist/types/fqnRef.mjs +1 -1
- package/dist/types/index.d.mts +11 -9
- package/dist/types/index.mjs +6 -166
- package/dist/types/scalar.d.mts +1 -1
- package/dist/types/scalar.mjs +1 -1
- package/dist/utils/graphology/index.mjs +1 -1
- package/dist/utils/index.d.mts +3 -3
- package/dist/utils/index.mjs +9 -8
- package/dist/utils/iterable/index.d.mts +17 -1
- package/dist/utils/iterable/index.mjs +17 -1
- package/geometry/package.json +4 -0
- package/package.json +20 -12
- package/dist/shared/core.B9BjmjuH.mjs +0 -9
- package/dist/shared/core.BR4zXDH-.mjs +0 -13
- package/dist/shared/core.BdPcbSkN.mjs +0 -118
- package/dist/shared/core.OHD4KXm9.mjs +0 -5
|
@@ -1,51 +1,11 @@
|
|
|
1
1
|
import { Tagged, NonEmptyTuple, IsNever, PartialDeep, WritableDeep, Except } from 'type-fest';
|
|
2
|
-
import {
|
|
3
|
-
import { A as Any, s as WithOptionalTags, u as WithOptionalLinks,
|
|
2
|
+
import { h as ElementShape, C as Color, B as BorderStyle, e as ShapeSize, S as SpacingSize, d as TextSize, f as RelationshipLineType, g as RelationshipArrowType, T as ThemeColor, G as ColorLiteral, Q as CustomColorDefinitions, a as LikeC4Theme, b as LikeC4StyleDefaults } from './core.9U0HL3oG.mjs';
|
|
3
|
+
import { A as Any, s as WithOptionalTags, u as WithOptionalLinks, S as StrictViewId, m as _stage, n as _type, F as Fqn, R as RelationKind, W as WithDescriptionAndTech, v as WithMetadata, w as WithNotation, E as ElementKind, T as Tag, y as DeploymentKind, C as MetadataKey, G as WithTags, x as DeploymentFqn } from './core.BkSYCfRg.mjs';
|
|
4
4
|
import { N as NonEmptyArray, E as ExclusiveUnion, a as NonEmptyReadonlyArray, L as Link } from './core.DB0Ue5Wx.mjs';
|
|
5
|
-
import {
|
|
5
|
+
import { M as MarkdownOrString, I as Icon, d as RelationId, T as Tag$1, P as ProjectId, j as NodeId, k as EdgeId, n as StepEdgeKind } from './core.CDdf8izT.mjs';
|
|
6
6
|
import { FqnRef } from '../types/fqnRef.mjs';
|
|
7
7
|
import { ModelExpression, ModelFqnExpr } from '../types/expression-model.mjs';
|
|
8
|
-
|
|
9
|
-
type Point = readonly [x: number, y: number];
|
|
10
|
-
interface XYPoint {
|
|
11
|
-
x: number;
|
|
12
|
-
y: number;
|
|
13
|
-
}
|
|
14
|
-
interface BBox {
|
|
15
|
-
x: number;
|
|
16
|
-
y: number;
|
|
17
|
-
width: number;
|
|
18
|
-
height: number;
|
|
19
|
-
}
|
|
20
|
-
declare namespace BBox {
|
|
21
|
-
function center({ x, y, width, height }: BBox): XYPoint;
|
|
22
|
-
function fromPoints(points: Point[]): BBox;
|
|
23
|
-
function merge(...boxes: BBox[]): BBox;
|
|
24
|
-
function fromRectBox(rect: RectBox): BBox;
|
|
25
|
-
function toRectBox(box: BBox): RectBox;
|
|
26
|
-
function expand(box: BBox, plus: number): BBox;
|
|
27
|
-
function shrink(box: BBox, minus: number): BBox;
|
|
28
|
-
/**
|
|
29
|
-
* Returns true if `a` includes `b` (i.e. `b` is inside `a`)
|
|
30
|
-
*/
|
|
31
|
-
function includes(a: BBox, b: BBox): boolean;
|
|
32
|
-
}
|
|
33
|
-
interface RectBox {
|
|
34
|
-
x1: number;
|
|
35
|
-
y1: number;
|
|
36
|
-
x2: number;
|
|
37
|
-
y2: number;
|
|
38
|
-
}
|
|
39
|
-
declare namespace RectBox {
|
|
40
|
-
function center({ x1, y1, x2, y2 }: RectBox): XYPoint;
|
|
41
|
-
function fromPoints(points: Point[]): RectBox;
|
|
42
|
-
function merge(...boxes: RectBox[]): RectBox;
|
|
43
|
-
function toBBox(box: RectBox): BBox;
|
|
44
|
-
/**
|
|
45
|
-
* Returns true if `a` includes `b` (i.e. `b` is inside `a`)
|
|
46
|
-
*/
|
|
47
|
-
function includes(a: RectBox, b: RectBox): boolean;
|
|
48
|
-
}
|
|
8
|
+
import { P as Point, X as XYPoint, B as BBox } from './core.BPGOjone.mjs';
|
|
49
9
|
|
|
50
10
|
interface AnyIncludePredicate<Expr> {
|
|
51
11
|
include: Expr[];
|
|
@@ -78,6 +38,11 @@ interface ViewRuleGlobalPredicateRef {
|
|
|
78
38
|
predicateId: GlobalPredicateId;
|
|
79
39
|
}
|
|
80
40
|
declare function isViewRuleGlobalPredicateRef(rule: object): rule is ViewRuleGlobalPredicateRef;
|
|
41
|
+
type RankValue = 'max' | 'min' | 'same' | 'sink' | 'source';
|
|
42
|
+
interface ViewRuleRank<Expr> {
|
|
43
|
+
targets: Expr[];
|
|
44
|
+
rank: RankValue;
|
|
45
|
+
}
|
|
81
46
|
type AutoLayoutDirection = 'TB' | 'BT' | 'LR' | 'RL';
|
|
82
47
|
declare function isAutoLayoutDirection(autoLayout: unknown): autoLayout is AutoLayoutDirection;
|
|
83
48
|
interface ViewRuleAutoLayout {
|
|
@@ -112,7 +77,6 @@ type ViewManualLayout = {
|
|
|
112
77
|
height: number;
|
|
113
78
|
}>;
|
|
114
79
|
readonly edges: Record<string, {
|
|
115
|
-
dotpos?: string;
|
|
116
80
|
points: NonEmptyArray<Point>;
|
|
117
81
|
controlPoints?: NonEmptyArray<XYPoint>;
|
|
118
82
|
labelBBox?: BBox;
|
|
@@ -182,6 +146,9 @@ interface ElementViewRuleGroup<A extends Any = Any> {
|
|
|
182
146
|
declare function isViewRuleGroup<A extends Any>(rule: ElementViewRule<A>): rule is ElementViewRuleGroup<A>;
|
|
183
147
|
interface ElementViewRuleStyle<A extends Any = Any> extends AnyViewRuleStyle<ModelFqnExpr<A>> {
|
|
184
148
|
}
|
|
149
|
+
interface ElementViewRuleRank<A extends Any = Any> extends ViewRuleRank<ModelFqnExpr<A>> {
|
|
150
|
+
}
|
|
151
|
+
declare function isViewRuleRank<A extends Any>(rule: ElementViewRule<A>): rule is ElementViewRuleRank<A>;
|
|
185
152
|
type ElementViewRule<A extends Any = Any> = ExclusiveUnion<{
|
|
186
153
|
IncludePredicate: ElementViewIncludePredicate<A>;
|
|
187
154
|
ExcludePredicate: ElementViewExcludePredicate<A>;
|
|
@@ -190,6 +157,7 @@ type ElementViewRule<A extends Any = Any> = ExclusiveUnion<{
|
|
|
190
157
|
GlobalStyle: ViewRuleGlobalStyle;
|
|
191
158
|
GlobalPredicateRef: ViewRuleGlobalPredicateRef;
|
|
192
159
|
AutoLayout: ViewRuleAutoLayout;
|
|
160
|
+
Rank: ElementViewRuleRank<A>;
|
|
193
161
|
}>;
|
|
194
162
|
interface ParsedElementView<A extends Any = Any> extends BaseParsedViewProperties<A> {
|
|
195
163
|
[_type]: 'element';
|
|
@@ -418,6 +386,9 @@ interface LikeC4Project {
|
|
|
418
386
|
* Custom styles
|
|
419
387
|
*/
|
|
420
388
|
styles?: LikeC4ProjectStylesConfig | undefined;
|
|
389
|
+
/**
|
|
390
|
+
* Configuration for manual layouts snapshots
|
|
391
|
+
*/
|
|
421
392
|
manualLayouts?: LikeC4ProjectManualLayoutsConfig | undefined;
|
|
422
393
|
}
|
|
423
394
|
|
|
@@ -492,6 +463,10 @@ interface ComputedEdge<A extends Any = Any> extends WithOptionalTags<A> {
|
|
|
492
463
|
*/
|
|
493
464
|
dir?: 'forward' | 'back' | 'both';
|
|
494
465
|
}
|
|
466
|
+
interface ComputedRankConstraint {
|
|
467
|
+
type: RankValue;
|
|
468
|
+
nodes: NodeId[];
|
|
469
|
+
}
|
|
495
470
|
interface BaseComputedViewProperties<A extends Any> extends BaseViewProperties<A>, ViewWithHash, ViewWithNotation {
|
|
496
471
|
readonly [_stage]: 'computed';
|
|
497
472
|
readonly autoLayout: ViewAutoLayout;
|
|
@@ -511,6 +486,7 @@ interface ComputedElementView<A extends Any = Any> extends BaseComputedViewPrope
|
|
|
511
486
|
readonly [_type]: 'element';
|
|
512
487
|
readonly viewOf?: Fqn<A>;
|
|
513
488
|
readonly extends?: StrictViewId<A>;
|
|
489
|
+
readonly ranks?: ComputedRankConstraint[];
|
|
514
490
|
}
|
|
515
491
|
interface ComputedDeploymentView<A extends Any = Any> extends BaseComputedViewProperties<A> {
|
|
516
492
|
readonly [_type]: 'deployment';
|
|
@@ -525,4 +501,4 @@ interface ComputedDynamicView<A extends Any = Any> extends BaseComputedViewPrope
|
|
|
525
501
|
readonly variant: DynamicViewDisplayVariant;
|
|
526
502
|
}
|
|
527
503
|
|
|
528
|
-
export {
|
|
504
|
+
export { getParallelStepsPrefix as $, type AbstractRelationship as A, type ViewAutoLayout as B, type ComputedNodeStyle as C, type ViewManualLayout as D, type ElementStyle as E, type ViewType as F, type GlobalPredicateId as G, type BaseViewProperties as H, type BaseParsedViewProperties as I, type ViewWithNotation as J, type ViewWithHash as K, type LikeC4ProjectStylesConfig as L, type ModelGlobals as M, type NodeNotation as N, type ComputedNode as O, type ComputedEdge as P, type ComputedRankConstraint as Q, type Relationship as R, type Specification as S, type TagSpecification as T, type ComputedElementView as U, type ViewRuleGlobalStyle as V, type ComputedDeploymentView as W, type ComputedDynamicView as X, type DynamicStep as Y, type DynamicStepsSeries as Z, type DynamicStepsParallel as _, type GlobalPredicates as a, type DynamicViewStep as a0, isDynamicStep as a1, isDynamicStepsParallel as a2, isDynamicStepsSeries as a3, type DynamicViewIncludeRule as a4, type DynamicViewRule as a5, type DynamicViewDisplayVariant as a6, type ParsedDynamicView as a7, type ElementViewIncludePredicate as a8, type ElementViewExcludePredicate as a9, type ElementViewPredicate as aa, type ElementViewRuleGroup as ab, isViewRuleGroup as ac, type ElementViewRuleStyle as ad, type ElementViewRuleRank as ae, isViewRuleRank as af, type ElementViewRule as ag, type ParsedElementView as ah, type GlobalDynamicPredicates as b, type GlobalStyleID as c, type GlobalStyles as d, ensureSizes as e, type Element as f, type ModelRelation as g, type ElementSpecification as h, isTagColorSpecified as i, type RelationshipSpecification as j, type LikeC4ProjectTheme as k, type LikeC4ProjectStyleDefaults as l, type LikeC4ProjectManualLayoutsConfig as m, type LikeC4Project as n, type AnyIncludePredicate as o, type AnyExcludePredicate as p, type AnyViewRuleStyle as q, isViewRuleGlobalStyle as r, type ViewRuleGlobalPredicateRef as s, isViewRuleGlobalPredicateRef as t, type RankValue as u, type ViewRuleRank as v, type AutoLayoutDirection as w, isAutoLayoutDirection as x, type ViewRuleAutoLayout as y, isViewRuleAutoLayout as z };
|