@likec4/core 1.45.0 → 1.46.2
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 +8 -7
- package/dist/builder/index.mjs +8 -7
- package/dist/compute-view/index.d.mts +8 -7
- package/dist/compute-view/index.mjs +5 -5
- package/dist/compute-view/relationships-view/index.d.mts +8 -7
- package/dist/geometry/index.d.mts +109 -0
- package/dist/geometry/index.mjs +328 -0
- package/dist/index.d.mts +10 -8
- package/dist/index.mjs +9 -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 +12 -11
- package/dist/model/index.mjs +4 -4
- package/dist/shared/{core.DnCLhN8C.d.mts → core.5gPDaaG5.d.mts} +5 -4
- package/dist/shared/{core.CQPEY2wQ.mjs → core.78IWAHAE.mjs} +1 -1
- package/dist/shared/{core.0zAQeenX.d.mts → core.9U0HL3oG.d.mts} +2 -2
- package/dist/shared/{core.DqlrMlsf.mjs → core.BFd1lU9R.mjs} +1 -1
- package/dist/shared/core.BPGOjone.d.mts +46 -0
- package/dist/shared/{core.DIE3F6sw.mjs → core.BYdtmqY5.mjs} +1 -2
- package/dist/shared/{core.B73yxfPi.d.mts → core.BkSYCfRg.d.mts} +1 -1
- 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.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.D_f4F48-.mjs → core.CRhT4Iio.mjs} +10 -7
- package/dist/shared/{core.DrUt0Lbi.mjs → core.CmGY9blO.mjs} +198 -291
- package/dist/shared/{core.C_Ni6yHl.mjs → core.D0WZutNd.mjs} +3 -1
- package/dist/shared/{core.mUnpvHtA.d.mts → core.DE-g9oFF.d.mts} +19 -49
- package/dist/shared/{core.M9ayqQZa.mjs → core.DEK-BO3_.mjs} +4 -5
- package/dist/shared/{core.CpURdWRM.d.mts → core.DK3pdsTf.d.mts} +8 -6
- package/dist/shared/{core.vzLtp8i3.mjs → core.DSalPD6v.mjs} +259 -189
- package/dist/shared/{core.CRI1AjFj.mjs → core.DVfPJPJj.mjs} +33 -30
- package/dist/shared/{core.Cog93roC.d.mts → core.DezoCAzf.d.mts} +3 -3
- package/dist/shared/{core.BGFjN3nv.d.mts → core.I8sCl3WM.d.mts} +3 -3
- package/dist/shared/{core.t3qfsVvn.d.mts → core.e5GJ61_a.d.mts} +3 -3
- package/dist/shared/{core.BuQZczj6.mjs → core.om36dXXW.mjs} +5 -2
- package/dist/shared/{core.Dvh1H0T2.d.mts → core.or6-EHsb.d.mts} +2 -2
- package/dist/shared/{core.DViDmiAu.mjs → core.xeuDd__E.mjs} +1 -2
- package/dist/shared/{core.CWwSgOzF.mjs → core.xgoPk2RG.mjs} +165 -135
- package/dist/styles/index.d.mts +7 -6
- package/dist/styles/index.mjs +1 -1
- 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 -180
- 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 +5 -5
- 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.BR4zXDH-.mjs +0 -13
- package/dist/shared/core.BdPcbSkN.mjs +0 -118
|
@@ -1,55 +1,11 @@
|
|
|
1
1
|
import { Tagged, NonEmptyTuple, IsNever, PartialDeep, WritableDeep, Except } from 'type-fest';
|
|
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.
|
|
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.
|
|
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 { M as MarkdownOrString, I as Icon, d as RelationId, T as Tag$1, P as ProjectId,
|
|
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
|
-
/**
|
|
23
|
-
* Returns the four corner points of the box in clockwise order starting from top-left
|
|
24
|
-
*/
|
|
25
|
-
function toPoints({ x, y, width, height }: BBox): [XYPoint, XYPoint, XYPoint, XYPoint];
|
|
26
|
-
function fromPoints(points: Point[]): BBox;
|
|
27
|
-
function merge(...boxes: BBox[]): BBox;
|
|
28
|
-
function fromRectBox(rect: RectBox): BBox;
|
|
29
|
-
function toRectBox(box: BBox): RectBox;
|
|
30
|
-
function expand(box: BBox, plus: number): BBox;
|
|
31
|
-
function shrink(box: BBox, minus: number): BBox;
|
|
32
|
-
/**
|
|
33
|
-
* Returns true if `a` includes `b` (i.e. `b` is inside `a`)
|
|
34
|
-
*/
|
|
35
|
-
function includes(a: BBox, b: BBox): boolean;
|
|
36
|
-
}
|
|
37
|
-
interface RectBox {
|
|
38
|
-
x1: number;
|
|
39
|
-
y1: number;
|
|
40
|
-
x2: number;
|
|
41
|
-
y2: number;
|
|
42
|
-
}
|
|
43
|
-
declare namespace RectBox {
|
|
44
|
-
function center({ x1, y1, x2, y2 }: RectBox): XYPoint;
|
|
45
|
-
function fromPoints(points: Point[]): RectBox;
|
|
46
|
-
function merge(...boxes: RectBox[]): RectBox;
|
|
47
|
-
function toBBox(box: RectBox): BBox;
|
|
48
|
-
/**
|
|
49
|
-
* Returns true if `a` includes `b` (i.e. `b` is inside `a`)
|
|
50
|
-
*/
|
|
51
|
-
function includes(a: RectBox, b: RectBox): boolean;
|
|
52
|
-
}
|
|
8
|
+
import { P as Point, X as XYPoint, B as BBox } from './core.BPGOjone.mjs';
|
|
53
9
|
|
|
54
10
|
interface AnyIncludePredicate<Expr> {
|
|
55
11
|
include: Expr[];
|
|
@@ -82,6 +38,11 @@ interface ViewRuleGlobalPredicateRef {
|
|
|
82
38
|
predicateId: GlobalPredicateId;
|
|
83
39
|
}
|
|
84
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
|
+
}
|
|
85
46
|
type AutoLayoutDirection = 'TB' | 'BT' | 'LR' | 'RL';
|
|
86
47
|
declare function isAutoLayoutDirection(autoLayout: unknown): autoLayout is AutoLayoutDirection;
|
|
87
48
|
interface ViewRuleAutoLayout {
|
|
@@ -185,6 +146,9 @@ interface ElementViewRuleGroup<A extends Any = Any> {
|
|
|
185
146
|
declare function isViewRuleGroup<A extends Any>(rule: ElementViewRule<A>): rule is ElementViewRuleGroup<A>;
|
|
186
147
|
interface ElementViewRuleStyle<A extends Any = Any> extends AnyViewRuleStyle<ModelFqnExpr<A>> {
|
|
187
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>;
|
|
188
152
|
type ElementViewRule<A extends Any = Any> = ExclusiveUnion<{
|
|
189
153
|
IncludePredicate: ElementViewIncludePredicate<A>;
|
|
190
154
|
ExcludePredicate: ElementViewExcludePredicate<A>;
|
|
@@ -193,6 +157,7 @@ type ElementViewRule<A extends Any = Any> = ExclusiveUnion<{
|
|
|
193
157
|
GlobalStyle: ViewRuleGlobalStyle;
|
|
194
158
|
GlobalPredicateRef: ViewRuleGlobalPredicateRef;
|
|
195
159
|
AutoLayout: ViewRuleAutoLayout;
|
|
160
|
+
Rank: ElementViewRuleRank<A>;
|
|
196
161
|
}>;
|
|
197
162
|
interface ParsedElementView<A extends Any = Any> extends BaseParsedViewProperties<A> {
|
|
198
163
|
[_type]: 'element';
|
|
@@ -498,6 +463,10 @@ interface ComputedEdge<A extends Any = Any> extends WithOptionalTags<A> {
|
|
|
498
463
|
*/
|
|
499
464
|
dir?: 'forward' | 'back' | 'both';
|
|
500
465
|
}
|
|
466
|
+
interface ComputedRankConstraint {
|
|
467
|
+
type: RankValue;
|
|
468
|
+
nodes: NodeId[];
|
|
469
|
+
}
|
|
501
470
|
interface BaseComputedViewProperties<A extends Any> extends BaseViewProperties<A>, ViewWithHash, ViewWithNotation {
|
|
502
471
|
readonly [_stage]: 'computed';
|
|
503
472
|
readonly autoLayout: ViewAutoLayout;
|
|
@@ -517,6 +486,7 @@ interface ComputedElementView<A extends Any = Any> extends BaseComputedViewPrope
|
|
|
517
486
|
readonly [_type]: 'element';
|
|
518
487
|
readonly viewOf?: Fqn<A>;
|
|
519
488
|
readonly extends?: StrictViewId<A>;
|
|
489
|
+
readonly ranks?: ComputedRankConstraint[];
|
|
520
490
|
}
|
|
521
491
|
interface ComputedDeploymentView<A extends Any = Any> extends BaseComputedViewProperties<A> {
|
|
522
492
|
readonly [_type]: 'deployment';
|
|
@@ -531,4 +501,4 @@ interface ComputedDynamicView<A extends Any = Any> extends BaseComputedViewPrope
|
|
|
531
501
|
readonly variant: DynamicViewDisplayVariant;
|
|
532
502
|
}
|
|
533
503
|
|
|
534
|
-
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 };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { t as t$1 } from './core.BsSXS-_R.mjs';
|
|
2
2
|
import { g as getDefaultExportFromCjs } from './core.B85MJLTf.mjs';
|
|
3
|
-
import { r as requireIterator } from './core.
|
|
4
|
-
import {
|
|
5
|
-
import { m as memoizeProp } from './core.BR4zXDH-.mjs';
|
|
3
|
+
import { r as requireForeach, b as requireIterator, a as markdownToText, m as markdownToHtml } from './core.CBLX4mT8.mjs';
|
|
4
|
+
import { m as memoizeProp } from './core.CLSZtnFh.mjs';
|
|
6
5
|
import { n as nonexhaustive } from './core.D4npX2q8.mjs';
|
|
7
6
|
|
|
8
7
|
function t(...t){return t$1(n,t)}function n(e,t){let n={...e};for(let[r,i]of Object.entries(n))t(i,r,e)&&delete n[r];return n}
|
|
@@ -1034,8 +1033,8 @@ function exact(a) {
|
|
|
1034
1033
|
return t(a, (v) => v === void 0);
|
|
1035
1034
|
}
|
|
1036
1035
|
|
|
1037
|
-
const symb_text = Symbol.for("text");
|
|
1038
|
-
const symb_html = Symbol.for("html");
|
|
1036
|
+
const symb_text = /* @__PURE__ */ Symbol.for("text");
|
|
1037
|
+
const symb_html = /* @__PURE__ */ Symbol.for("html");
|
|
1039
1038
|
const emptyTxt = "";
|
|
1040
1039
|
const mdcache = new LRUMap(500);
|
|
1041
1040
|
const txtcache = new LRUMap(500);
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { SetRequired, IsAny } from 'type-fest';
|
|
2
|
-
import { L as LikeC4Styles } from './core.
|
|
3
|
-
import { A as Any, R as RelationKind, r as Tags, H as Metadata, C as MetadataKey, I as LooseTag, F as Fqn, a as ElementId, E as ElementKind, y as DeploymentKind, c as AnyLayouted, J as RelationId$1, S as StrictViewId, n as _type, m as _stage, K as LooseElementId, O as LooseDeploymentId, x as DeploymentFqn, t as toComputed, b as AnyComputed, Q as Stage, D as DeploymentId, V as ViewId, T as Tag, d as AnyParsed, P as ProjectId$1, X as LooseViewId, U as Unknown, e as Aux, i as UnknownParsed, g as UnknownComputed, h as UnknownLayouted } from './core.
|
|
4
|
-
import { d as RelationId, P as ProjectId, a as IconUrl,
|
|
2
|
+
import { L as LikeC4Styles } from './core.or6-EHsb.mjs';
|
|
3
|
+
import { A as Any, R as RelationKind, r as Tags, H as Metadata, C as MetadataKey, I as LooseTag, F as Fqn, a as ElementId, E as ElementKind, y as DeploymentKind, c as AnyLayouted, J as RelationId$1, S as StrictViewId, n as _type, m as _stage, K as LooseElementId, O as LooseDeploymentId, x as DeploymentFqn, t as toComputed, b as AnyComputed, Q as Stage, D as DeploymentId, V as ViewId, T as Tag, d as AnyParsed, P as ProjectId$1, X as LooseViewId, U as Unknown, e as Aux, i as UnknownParsed, g as UnknownComputed, h as UnknownLayouted } from './core.BkSYCfRg.mjs';
|
|
4
|
+
import { d as RelationId, P as ProjectId, a as IconUrl, j as NodeId, G as GroupElementKind, k as EdgeId, l as StepEdgeId, V as ViewId$1 } from './core.CDdf8izT.mjs';
|
|
5
5
|
import { D as DefaultMap } from './core.CywrQs86.mjs';
|
|
6
|
-
import { b as RichTextOrEmpty, L as LayoutedView, V as ViewManualLayoutSnapshot, r as ComputedView, v as ViewWithType, P as ParsedLikeC4ModelData, C as ComputedLikeC4ModelData, c as LayoutedLikeC4ModelData, e as DeployedInstance, j as DeploymentRelationship, f as DeploymentElement, D as DeploymentNode, m as LikeC4ModelDump, o as AuxFromDump } from './core.
|
|
6
|
+
import { b as RichTextOrEmpty, L as LayoutedView, V as ViewManualLayoutSnapshot, r as ComputedView, v as ViewWithType, P as ParsedLikeC4ModelData, C as ComputedLikeC4ModelData, c as LayoutedLikeC4ModelData, e as DeployedInstance, j as DeploymentRelationship, f as DeploymentElement, D as DeploymentNode, m as LikeC4ModelDump, o as AuxFromDump } from './core.5gPDaaG5.mjs';
|
|
7
7
|
import { c as IteratorLike, L as Link, N as NonEmptyArray } from './core.DB0Ue5Wx.mjs';
|
|
8
|
-
import { C as Color, f as RelationshipLineType, g as RelationshipArrowType, h as ElementShape, W as WhereOperator } from './core.
|
|
9
|
-
import {
|
|
8
|
+
import { C as Color, f as RelationshipLineType, g as RelationshipArrowType, h as ElementShape, W as WhereOperator } from './core.9U0HL3oG.mjs';
|
|
9
|
+
import { R as Relationship, f as Element, E as ElementStyle, C as ComputedNodeStyle, a6 as DynamicViewDisplayVariant, n as LikeC4Project, S as Specification, M as ModelGlobals } from './core.DE-g9oFF.mjs';
|
|
10
|
+
import { B as BBox } from './core.BPGOjone.mjs';
|
|
10
11
|
import { FqnRef } from '../types/fqnRef.mjs';
|
|
11
12
|
|
|
12
13
|
type RelationshipsIterator<A extends Any> = IteratorLike<RelationshipModel<A>>;
|
|
@@ -724,6 +725,7 @@ declare abstract class AbstractDeploymentElementModel<A extends Any> implements
|
|
|
724
725
|
get name(): string;
|
|
725
726
|
get shape(): ElementShape;
|
|
726
727
|
get color(): Color;
|
|
728
|
+
get icon(): IconUrl | null;
|
|
727
729
|
/**
|
|
728
730
|
* Short description of the element.
|
|
729
731
|
* Falls back to description if summary is not provided.
|