@likec4/core 1.44.0 → 1.45.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.
Files changed (51) hide show
  1. package/dist/builder/index.d.mts +14 -13
  2. package/dist/builder/index.mjs +29 -14
  3. package/dist/compute-view/index.d.mts +6 -6
  4. package/dist/compute-view/index.mjs +6 -5
  5. package/dist/compute-view/relationships-view/index.d.mts +6 -6
  6. package/dist/compute-view/relationships-view/index.mjs +2 -2
  7. package/dist/index.d.mts +25 -5
  8. package/dist/index.mjs +2 -1
  9. package/dist/model/connection/deployment/index.d.mts +8 -8
  10. package/dist/model/connection/deployment/index.mjs +2 -2
  11. package/dist/model/connection/index.d.mts +9 -9
  12. package/dist/model/connection/index.mjs +3 -3
  13. package/dist/model/connection/model/index.d.mts +8 -8
  14. package/dist/model/connection/model/index.mjs +2 -2
  15. package/dist/model/index.d.mts +11 -25
  16. package/dist/model/index.mjs +4 -4
  17. package/dist/shared/{core.BnOetIAR.d.mts → core.0zAQeenX.d.mts} +2 -2
  18. package/dist/shared/{core.Bv3cd-jC.mjs → core.3ZhnKAlZ.mjs} +9 -5
  19. package/dist/shared/{core.CDOKQTW6.d.mts → core.B73yxfPi.d.mts} +2 -2
  20. package/dist/shared/{core.DTJYgLXI.d.mts → core.BGFjN3nv.d.mts} +3 -3
  21. package/dist/shared/core.BhNcrwzK.mjs +7 -0
  22. package/dist/shared/core.BkVA6gjl.mjs +5 -0
  23. package/dist/shared/{core.bKIs4oDO.mjs → core.CQPEY2wQ.mjs} +5 -4
  24. package/dist/shared/{core.h4TqqSC0.mjs → core.CRI1AjFj.mjs} +67 -1172
  25. package/dist/shared/{core.23WeDKcI.mjs → core.CWwSgOzF.mjs} +224 -224
  26. package/dist/shared/{core.6VsRBhGY.mjs → core.CdNCAwq7.mjs} +1 -1
  27. package/dist/shared/{core.BnDbAOR2.d.mts → core.Cog93roC.d.mts} +2 -2
  28. package/dist/shared/core.Coi_LOUZ.mjs +7 -0
  29. package/dist/shared/{core.DjAM-S6a.d.mts → core.CpURdWRM.d.mts} +14 -13
  30. package/dist/shared/{core.DFCHU59b.mjs → core.DViDmiAu.mjs} +2 -2
  31. package/dist/shared/{core.CHwVhuc9.mjs → core.D_f4F48-.mjs} +10 -13
  32. package/dist/shared/{core.CbsSAn1j.mjs → core.DbfO90vF.mjs} +1 -12
  33. package/dist/shared/{core.CKNmSm2W.d.mts → core.DnCLhN8C.d.mts} +7 -14
  34. package/dist/shared/{core.C0Ye2OCr.mjs → core.DqlrMlsf.mjs} +1 -1
  35. package/dist/shared/{core.8mmHFn9g.d.mts → core.Dvh1H0T2.d.mts} +2 -2
  36. package/dist/shared/{core.BMtVqKl7.d.mts → core.mUnpvHtA.d.mts} +11 -5
  37. package/dist/shared/core.oSV6SRfk.mjs +13 -0
  38. package/dist/shared/{core.WwMWeiFL.d.mts → core.t3qfsVvn.d.mts} +3 -3
  39. package/dist/shared/core.vzLtp8i3.mjs +1282 -0
  40. package/dist/styles/index.d.mts +5 -5
  41. package/dist/styles/index.mjs +3 -3
  42. package/dist/types/_aux.d.mts +1 -1
  43. package/dist/types/expression-model.d.mts +2 -2
  44. package/dist/types/expression.d.mts +2 -2
  45. package/dist/types/fqnRef.d.mts +1 -1
  46. package/dist/types/index.d.mts +7 -7
  47. package/dist/types/index.mjs +23 -9
  48. package/dist/utils/index.mjs +5 -4
  49. package/package.json +8 -8
  50. package/dist/shared/core.B9BjmjuH.mjs +0 -9
  51. package/dist/shared/core.OHD4KXm9.mjs +0 -5
@@ -1,4 +1,4 @@
1
- import { c as compareNatural } from './core.Bv3cd-jC.mjs';
1
+ import { c as compareNatural } from './core.3ZhnKAlZ.mjs';
2
2
 
3
3
  function isString(value) {
4
4
  return value != null && typeof value === "string";
@@ -1,5 +1,5 @@
1
- import { E as ElementModel, D as DeploymentElementModel } from './core.DjAM-S6a.mjs';
2
- import { A as Any } from './core.CDOKQTW6.mjs';
1
+ import { E as ElementModel, e as DeploymentElementModel } from './core.CpURdWRM.mjs';
2
+ import { A as Any } from './core.B73yxfPi.mjs';
3
3
  import { F as Fqn } from './core.DX-WYEPA.mjs';
4
4
 
5
5
  interface Connection<Elem = ElementModel<Any> | DeploymentElementModel<Any>, Id = string> {
@@ -0,0 +1,7 @@
1
+ import { t as t$2 } from './core.BsSXS-_R.mjs';
2
+
3
+ function t$1(...t){return t$2(Object.entries,t)}
4
+
5
+ function e(e,...n){return typeof e==`string`||typeof e==`number`||typeof e==`symbol`?r=>t(r,e,...n):t(e,...n)}function t(e,...t){let n=e;for(let e of t){if(n==null)return;n=n[e];}return n}
6
+
7
+ export { e, t$1 as t };
@@ -1,12 +1,12 @@
1
1
  import { SetRequired, IsAny } from 'type-fest';
2
- import { L as LikeC4Styles } from './core.8mmHFn9g.mjs';
3
- import { A as Any, R as RelationKind, r as Tags, H as Metadata, C as MetadataKey, I as LooseTag, F as Fqn, o as ElementId, n as ElementKind, y as DeploymentKind, b as AnyLayouted, J as RelationId$1, m as StrictViewId, k as _type, j as _stage, K as LooseElementId, O as LooseDeploymentId, x as DeploymentFqn, t as toComputed, a as AnyComputed, Q as Stage, D as DeploymentId, V as ViewId, T as Tag, c as AnyParsed, P as ProjectId$1, X as LooseViewId, U as Unknown, d as Aux, g as UnknownParsed, e as UnknownComputed, f as UnknownLayouted } from './core.CDOKQTW6.mjs';
2
+ import { L as LikeC4Styles } from './core.Dvh1H0T2.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.B73yxfPi.mjs';
4
4
  import { d as RelationId, P as ProjectId, a as IconUrl, N as NodeId, G as GroupElementKind, j as EdgeId, k as StepEdgeId, V as ViewId$1 } from './core.DX-WYEPA.mjs';
5
5
  import { D as DefaultMap } from './core.CywrQs86.mjs';
6
- import { b as RichTextOrEmpty, p as LayoutedView, W as ViewManualLayoutSnapshot, Q as LayoutedViewDriftReason, r as ComputedView, u as ViewWithType, P as ParsedLikeC4ModelData, C as ComputedLikeC4ModelData, L as LayoutedLikeC4ModelData, d as DeployedInstance, h as DeploymentRelationship, e as DeploymentElement, D as DeploymentNode, l as LikeC4ModelDump, n as AuxFromDump } from './core.CKNmSm2W.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.DnCLhN8C.mjs';
7
7
  import { c as IteratorLike, L as Link, N as NonEmptyArray } from './core.DB0Ue5Wx.mjs';
8
- import { Q as Color, v as RelationshipLineType, y as RelationshipArrowType, u as ElementShape, W as WhereOperator } from './core.BnOetIAR.mjs';
9
- import { g as Relationship, f as Element, E as ElementStyle, K as ComputedNodeStyle, B as BBox, a7 as DynamicViewDisplayVariant, o as LikeC4Project, S as Specification, M as ModelGlobals } from './core.BMtVqKl7.mjs';
8
+ import { C as Color, f as RelationshipLineType, g as RelationshipArrowType, h as ElementShape, W as WhereOperator } from './core.0zAQeenX.mjs';
9
+ import { g as Relationship, f as Element, E as ElementStyle, C as ComputedNodeStyle, B as BBox, a7 as DynamicViewDisplayVariant, o as LikeC4Project, S as Specification, M as ModelGlobals } from './core.mUnpvHtA.mjs';
10
10
  import { FqnRef } from '../types/fqnRef.mjs';
11
11
 
12
12
  type RelationshipsIterator<A extends Any> = IteratorLike<RelationshipModel<A>>;
@@ -469,7 +469,8 @@ declare class LikeC4ViewModel<A extends Any = Any, V extends $View<A> = $View<A>
469
469
  */
470
470
  get includedTags(): Tags<A>;
471
471
  /**
472
- * The original view (auto-layouted).
472
+ * The original view from the model.
473
+ * In case of layouted model, this is the latest auto-layouted view without manual changes applied
473
474
  * @see {@link $layouted} should be used for rendering in the UI
474
475
  */
475
476
  get $view(): V;
@@ -479,15 +480,11 @@ declare class LikeC4ViewModel<A extends Any = Any, V extends $View<A> = $View<A>
479
480
  */
480
481
  get $layouted(): V;
481
482
  get hasManualLayout(): boolean;
483
+ get hasLayoutDrifts(): boolean;
482
484
  /**
483
485
  * If view has manual layout, returns it with manual layout applied
484
486
  */
485
- get manualLayouted(): V | null;
486
- /**
487
- * Returns the layout drift reasons, if any
488
- * (Only for layouted views with manual layout)
489
- */
490
- get driftReasons(): readonly LayoutedViewDriftReason[];
487
+ get $manual(): V | null;
491
488
  roots(): NodesIterator<A, V>;
492
489
  /**
493
490
  * Iterate over all nodes that have children.
@@ -1121,6 +1118,10 @@ declare class LikeC4Model<A extends Any = Any> {
1121
1118
  * model.findView('index')
1122
1119
  */
1123
1120
  findView(viewId: LooseViewId<A>): $ViewModel<A> | null;
1121
+ /**
1122
+ * Returns manual layout snapshot for given view ID, if any.
1123
+ */
1124
+ findManualLayout(viewId: LooseViewId<A>): ViewManualLayoutSnapshot | null;
1124
1125
  /**
1125
1126
  * Returns a view folder by its path.
1126
1127
  * Path is extracted from the view title, e.g. "Group 1/Group 2/View" -> "Group 1/Group 2"
@@ -1257,4 +1258,4 @@ declare namespace LikeC4Model {
1257
1258
  type AnyRelation<M = Any> = M extends Any ? RelationshipModel<M> | DeploymentRelationModel<M> : never;
1258
1259
  }
1259
1260
 
1260
- export { type AnyRelationshipModel as A, type DeploymentElementModel as D, ElementModel as E, type IncomingFilter as I, LikeC4Model as L, NestedElementOfDeployedInstanceModel as N, type OutgoingFilter as O, RelationshipModel as R, type WithMetadata as W, DeploymentNodeModel as a, DeployedInstanceModel as b, DeploymentRelationModel as c, LikeC4ViewModel as d, NodeModel as e, EdgeModel as f, type AnyLikeC4Model as g, RelationshipsAccum as h, type DeploymentRelationEndpoint as i, LikeC4DeploymentModel as j, LikeC4ViewsFolder as k, type DeploymentOrFqn as l, type EdgeOrId as m, type ElementOrFqn as n, type NodeOrId as o, type WithTags as p };
1261
+ export { type AnyRelationshipModel as A, DeploymentNodeModel as D, ElementModel as E, type IncomingFilter as I, LikeC4ViewModel as L, NestedElementOfDeployedInstanceModel as N, type OutgoingFilter as O, RelationshipModel as R, type WithMetadata as W, DeployedInstanceModel as a, DeploymentRelationModel as b, NodeModel as c, EdgeModel as d, type DeploymentElementModel as e, LikeC4Model as f, type AnyLikeC4Model as g, RelationshipsAccum as h, type DeploymentRelationEndpoint as i, LikeC4DeploymentModel as j, LikeC4ViewsFolder as k, type DeploymentOrFqn as l, type EdgeOrId as m, type ElementOrFqn as n, type NodeOrId as o, type WithTags as p };
@@ -1,10 +1,10 @@
1
1
  import { g as getDefaultExportFromCjs } from './core.B85MJLTf.mjs';
2
2
  import { r as requireIterator } from './core.BdPcbSkN.mjs';
3
3
  import { r as requireForeach } from './core.CR3PmPzr.mjs';
4
- import { t as t$3 } from './core.OHD4KXm9.mjs';
4
+ import { t as t$3 } from './core.3ZhnKAlZ.mjs';
5
5
  import { t as t$4 } from './core.CbT8JVYL.mjs';
6
6
  import { t as t$2 } from './core.BsSXS-_R.mjs';
7
- import { g as commonAncestor, k as compareFqnHierarchically } from './core.6VsRBhGY.mjs';
7
+ import { g as commonAncestor, k as compareFqnHierarchically } from './core.CdNCAwq7.mjs';
8
8
  import { e } from './core.RfnaEmgA.mjs';
9
9
  import { i as invariant } from './core.D4npX2q8.mjs';
10
10
 
@@ -1,22 +1,19 @@
1
- import { c as customInspectSymbol } from './core.C0Ye2OCr.mjs';
2
- import { i as intersection, d as difference, u as union, a as stringHash, e as equals } from './core.CbsSAn1j.mjs';
3
- import { t as t$3 } from './core.BsSXS-_R.mjs';
1
+ import { c as customInspectSymbol } from './core.DqlrMlsf.mjs';
2
+ import { i as intersection, d as difference, u as union, e as equals } from './core.DbfO90vF.mjs';
3
+ import { t as t$1 } from './core.BsSXS-_R.mjs';
4
4
  import { e as e$1 } from './core.BKlholso.mjs';
5
- import { t as t$2, a as t$4 } from './core.OHD4KXm9.mjs';
6
- import { m as hierarchyLevel, g as commonAncestor, n as nameFromFqn, d as isSameHierarchy } from './core.6VsRBhGY.mjs';
5
+ import { n as n$1 } from './core.BhNcrwzK.mjs';
6
+ import { m as hierarchyLevel, g as commonAncestor, n as nameFromFqn, d as isSameHierarchy } from './core.CdNCAwq7.mjs';
7
7
  import { a as nonNullable, i as invariant } from './core.D4npX2q8.mjs';
8
8
  import { m as memoizeProp } from './core.BR4zXDH-.mjs';
9
9
  import { e as exact, R as RichText } from './core.M9ayqQZa.mjs';
10
10
  import { preferSummary, preferDescription } from '../types/_aux.mjs';
11
11
  import { i as ihead } from './core.uFk_o9X6.mjs';
12
-
13
- function t$1(t,n){let r=n.length-t.length;if(r===1){let[r,...i]=n;return t$2(r,{lazy:t,lazyArgs:i})}if(r===0){let r={lazy:t,lazyArgs:n};return Object.assign(t=>t$2(t,r),r)}throw Error(`Wrong number of arguments`)}
12
+ import { s as stringHash } from './core.oSV6SRfk.mjs';
14
13
 
15
14
  function e(e){return e===``||e===void 0?true:Array.isArray(e)?e.length===0:Object.keys(e).length===0}
16
15
 
17
- function t(...t){return t$3(n$1,t)}function n$1(e,t){if(e===t||Object.is(e,t))return true;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return false;if(e instanceof Map&&t instanceof Map)return r$1(e,t);if(e instanceof Set&&t instanceof Set)return i(e,t);let n=Object.keys(e);if(n.length!==Object.keys(t).length)return false;for(let r of n){if(!Object.hasOwn(t,r))return false;let{[r]:n}=e,{[r]:i}=t;if(n!==i||!Object.is(n,i))return false}return true}function r$1(e,t){if(e.size!==t.size)return false;for(let[n,r]of e){let e=t.get(n);if(r!==e||!Object.is(r,e))return false}return true}function i(e,t){if(e.size!==t.size)return false;for(let n of e)if(!t.has(n))return false;return true}
18
-
19
- function n(...e){return t$1(r,e)}function r(){let t=new Set;return n=>t.has(n)?t$4:(t.add(n),{done:false,hasNext:true,next:n})}
16
+ function t(...t){return t$1(n,t)}function n(e,t){if(e===t||Object.is(e,t))return true;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return false;if(e instanceof Map&&t instanceof Map)return r(e,t);if(e instanceof Set&&t instanceof Set)return i(e,t);let n=Object.keys(e);if(n.length!==Object.keys(t).length)return false;for(let r of n){if(!Object.hasOwn(t,r))return false;let{[r]:n}=e,{[r]:i}=t;if(n!==i||!Object.is(n,i))return false}return true}function r(e,t){if(e.size!==t.size)return false;for(let[n,r]of e){let e=t.get(n);if(r!==e||!Object.is(r,e))return false}return true}function i(e,t){if(e.size!==t.size)return false;for(let n of e)if(!t.has(n))return false;return true}
20
17
 
21
18
  class AbstractDeploymentElementModel {
22
19
  /**
@@ -211,7 +208,7 @@ class DeploymentNodeModel extends AbstractDeploymentElementModel {
211
208
  }
212
209
  get tags() {
213
210
  return memoizeProp(this, Symbol.for("tags"), () => {
214
- return n([
211
+ return n$1([
215
212
  ...this.$node.tags ?? [],
216
213
  ...this.$model.$model.specification.deployments[this.kind]?.tags ?? []
217
214
  ]);
@@ -336,7 +333,7 @@ class DeployedInstanceModel extends AbstractDeploymentElementModel {
336
333
  }
337
334
  get tags() {
338
335
  return memoizeProp(this, Symbol.for("tags"), () => {
339
- return n([
336
+ return n$1([
340
337
  ...this.$instance.tags ?? [],
341
338
  ...this.element.tags
342
339
  ]);
@@ -782,4 +779,4 @@ const deploymentConnection = {
782
779
  findConnectionsWithin: findConnectionsWithin
783
780
  };
784
781
 
785
- export { DeploymentConnectionModel as D, NestedElementOfDeployedInstanceModel as N, RelationshipsAccum as R, DeploymentNodeModel as a, DeployedInstanceModel as b, DeploymentRelationModel as c, deploymentConnection as d, e, findConnection as f, findConnectionsBetween as g, findConnectionsWithin as h, n, t };
782
+ export { DeploymentConnectionModel as D, NestedElementOfDeployedInstanceModel as N, RelationshipsAccum as R, DeploymentNodeModel as a, DeployedInstanceModel as b, DeploymentRelationModel as c, deploymentConnection as d, e, findConnection as f, findConnectionsBetween as g, findConnectionsWithin as h, t };
@@ -1,5 +1,4 @@
1
1
  import { a as t } from './core.BsSXS-_R.mjs';
2
- import { i as invariant } from './core.D4npX2q8.mjs';
3
2
 
4
3
  var set = {};
5
4
 
@@ -432,14 +431,4 @@ function hasIntersection(a, b) {
432
431
  return false;
433
432
  }
434
433
 
435
- function stringHash(str) {
436
- let hash = 5381;
437
- const len = str.length;
438
- invariant(len > 0, "stringHash: empty string");
439
- for (let i = 0; i < len; i++) {
440
- hash = hash * 33 ^ str.charCodeAt(i);
441
- }
442
- return (hash >>> 0).toString(36);
443
- }
444
-
445
- export { stringHash as a, difference as d, equals as e, hasIntersection as h, intersection as i, symmetricDifference as s, union as u };
434
+ export { difference as d, equals as e, hasIntersection as h, intersection as i, symmetricDifference as s, union as u };
@@ -1,10 +1,10 @@
1
1
  import { Simplify, IsAny } from 'type-fest';
2
- import { A as Any, U as Unknown, W as WithDescriptionAndTech, s as WithOptionalTags, u as WithOptionalLinks, v as WithMetadata, w as WithNotation, x as DeploymentFqn, y as DeploymentKind, F as Fqn, k as _type, j as _stage, l as _layout, N as NodeId, z as EdgeId, m as StrictViewId, E as ExtractOnStage, M as ModelStage, P as ProjectId, o as ElementId, D as DeploymentId, c as AnyParsed, g as UnknownParsed, V as ViewId$1, a as AnyComputed, e as UnknownComputed, b as AnyLayouted, f as UnknownLayouted, S as SpecAux, d as Aux, B as Never } from './core.CDOKQTW6.mjs';
2
+ import { A as Any, U as Unknown, W as WithDescriptionAndTech, s as WithOptionalTags, u as WithOptionalLinks, v as WithMetadata, w as WithNotation, x as DeploymentFqn, y as DeploymentKind, F as Fqn, n as _type, m as _stage, o as _layout, S as StrictViewId, N as NodeId, z as EdgeId, k as ExtractOnStage, M as ModelStage, P as ProjectId, a as ElementId, D as DeploymentId, d as AnyParsed, i as UnknownParsed, V as ViewId$1, b as AnyComputed, g as UnknownComputed, c as AnyLayouted, h as UnknownLayouted, f as SpecAux, e as Aux, B as Never } from './core.B73yxfPi.mjs';
3
3
  import { a as NonEmptyReadonlyArray, N as NonEmptyArray, E as ExclusiveUnion, K as KeysOf } from './core.DB0Ue5Wx.mjs';
4
- import { E as ElementStyle, A as AbstractRelationship, D as ViewType, B as BBox, z as ViewAutoLayout, I as ViewWithNotation, F as BaseViewProperties, J as ViewWithHash, O as ComputedNode, Q as ComputedEdge, P as Point, X as XYPoint, a7 as DynamicViewDisplayVariant, H as BaseParsedViewProperties, p as AnyIncludePredicate, q as AnyExcludePredicate, r as AnyViewRuleStyle, x as ViewRuleAutoLayout, ag as ParsedElementView, a8 as ParsedDynamicView, U as ComputedElementView, W as ComputedDeploymentView, Y as ComputedDynamicView, o as LikeC4Project, S as Specification, f as Element, g as Relationship, M as ModelGlobals } from './core.BMtVqKl7.mjs';
4
+ import { E as ElementStyle, A as AbstractRelationship, F as ViewType, B as BBox, z as ViewAutoLayout, J as ViewWithNotation, H as BaseViewProperties, K as ViewWithHash, O as ComputedNode, Q as ComputedEdge, P as Point, X as XYPoint, a7 as DynamicViewDisplayVariant, I as BaseParsedViewProperties, p as AnyIncludePredicate, q as AnyExcludePredicate, r as AnyViewRuleStyle, x as ViewRuleAutoLayout, ag as ParsedElementView, a8 as ParsedDynamicView, U as ComputedElementView, W as ComputedDeploymentView, Y as ComputedDynamicView, o as LikeC4Project, S as Specification, f as Element, g as Relationship, M as ModelGlobals } from './core.mUnpvHtA.mjs';
5
5
  import { FqnRef } from '../types/fqnRef.mjs';
6
6
  import { F as Fqn$1, V as ViewId, M as MarkdownOrString, d as RelationId } from './core.DX-WYEPA.mjs';
7
- import { E as Expression, F as FqnExpr } from './core.BnOetIAR.mjs';
7
+ import { j as Expression, F as FqnExpr } from './core.0zAQeenX.mjs';
8
8
 
9
9
  interface DeploymentNode<A extends Any = Unknown> extends WithDescriptionAndTech, WithOptionalTags<A>, WithOptionalLinks, WithMetadata<A>, WithNotation {
10
10
  element?: never;
@@ -44,9 +44,9 @@ interface DeploymentRelationship<A extends Any = Unknown> extends AbstractRelati
44
44
  */
45
45
  type DeploymentRelation<A extends Any = Unknown> = DeploymentRelationship<A>;
46
46
 
47
- type LayoutedViewDriftReason = 'not-exists' | 'type-changed' | 'nodes-mismatch' | 'edges-mismatch';
48
- type DiagramNodeDriftReason = 'missing' | 'label-changed' | 'modelRef-changed' | 'parent-changed' | 'children-changed' | 'became-compound' | 'became-leaf' | 'shape-changed';
49
- type DiagramEdgeDriftReason = 'missing' | 'label-changed' | 'direction-changed' | 'source-changed' | 'target-changed';
47
+ type LayoutedViewDriftReason = 'not-exists' | 'type-changed' | 'nodes-added' | 'nodes-removed' | 'nodes-drift' | 'edges-added' | 'edges-removed' | 'edges-drift';
48
+ type DiagramNodeDriftReason = 'removed' | 'added' | 'label-changed' | 'modelRef-changed' | 'parent-changed' | 'children-changed' | 'became-compound' | 'became-leaf' | 'shape-changed';
49
+ type DiagramEdgeDriftReason = 'removed' | 'added' | 'label-added' | 'label-removed' | 'label-changed' | 'notes-changed' | 'direction-changed' | 'source-changed' | 'target-changed';
50
50
  type ViewManualLayoutSnapshotPerType = {
51
51
  readonly [_type]: 'element';
52
52
  readonly viewOf?: Fqn$1;
@@ -107,13 +107,6 @@ interface DiagramEdge<A extends Any = Any> extends ComputedEdge<A> {
107
107
  * (Absolute coordinates)
108
108
  */
109
109
  labelBBox?: BBox | null;
110
- /**
111
- * Graphviz edge POS
112
- *
113
- * TODO: temporary solution, should be moved out
114
- * @deprecated
115
- */
116
- dotpos?: string;
117
110
  /**
118
111
  * List of reasons causing edge drift
119
112
  */
@@ -469,4 +462,4 @@ declare class RichText {
469
462
  equals(other: unknown): boolean;
470
463
  }
471
464
 
472
- export { type DeploymentViewRule as $, type AuxFromLikeC4ModelData as A, isElementView as B, type ComputedLikeC4ModelData as C, type DeploymentNode as D, isScopedElementView as E, isExtendsElementView as F, isDeploymentView as G, isDynamicView as H, type DiagramNode as I, type DiagramEdge as J, type LayoutType as K, type LayoutedLikeC4ModelData as L, type LayoutedElementView as M, type LayoutedDeploymentView as N, LayoutedDynamicView as O, type ParsedLikeC4ModelData as P, type LayoutedViewDriftReason as Q, RichText as R, type SpecificationDump as S, type DiagramNodeDriftReason as T, type DiagramEdgeDriftReason as U, type ViewOnStage as V, type ViewManualLayoutSnapshot as W, type DeploymentViewIncludePredicate as X, type DeploymentViewExcludePredicate as Y, type DeploymentViewPredicate as Z, type DeploymentViewRuleStyle as _, type RichTextEmpty as a, type ParsedDeploymentView as a0, type RichTextOrEmpty as b, type LikeC4ModelData as c, type DeployedInstance as d, type DeploymentElement as e, type DeploymentElementRef as f, isDeployedInstance as g, type DeploymentRelationship as h, isDeploymentNode as i, type DeploymentRelation as j, type SpecTypesFromDump as k, type LikeC4ModelDump as l, type ProjectDump as m, type AuxFromDump as n, type ParsedView as o, type LayoutedView as p, isDiagramView as q, type ComputedView as r, type ProcessedView as s, type AnyView as t, type ViewWithType as u, type ViewRule as v, type ViewRulePredicate as w, isViewRulePredicate as x, isViewRuleStyle as y, isComputedView as z };
465
+ export { type DeploymentViewRule as $, type AuxFromLikeC4ModelData as A, isComputedView as B, type ComputedLikeC4ModelData as C, type DeploymentNode as D, isElementView as E, isScopedElementView as F, isExtendsElementView as G, isDeploymentView as H, isDynamicView as I, type DiagramNode as J, type DiagramEdge as K, type LayoutedView as L, type LayoutType as M, type LayoutedElementView as N, type LayoutedDeploymentView as O, type ParsedLikeC4ModelData as P, LayoutedDynamicView as Q, RichText as R, type SpecificationDump as S, type LayoutedViewDriftReason as T, type DiagramNodeDriftReason as U, type ViewManualLayoutSnapshot as V, type DiagramEdgeDriftReason as W, type DeploymentViewIncludePredicate as X, type DeploymentViewExcludePredicate as Y, type DeploymentViewPredicate as Z, type DeploymentViewRuleStyle as _, type RichTextEmpty as a, type ParsedDeploymentView as a0, type RichTextOrEmpty as b, type LayoutedLikeC4ModelData as c, type LikeC4ModelData as d, type DeployedInstance as e, type DeploymentElement as f, type DeploymentElementRef as g, isDeployedInstance as h, isDeploymentNode as i, type DeploymentRelationship as j, type DeploymentRelation as k, type SpecTypesFromDump as l, type LikeC4ModelDump as m, type ProjectDump as n, type AuxFromDump as o, type ParsedView as p, isDiagramView as q, type ComputedView as r, type ProcessedView as s, type AnyView as t, type ViewOnStage as u, type ViewWithType as v, type ViewRule as w, type ViewRulePredicate as x, isViewRulePredicate as y, isViewRuleStyle as z };
@@ -1,4 +1,4 @@
1
- import { i as isAncestor } from './core.6VsRBhGY.mjs';
1
+ import { i as isAncestor } from './core.CdNCAwq7.mjs';
2
2
 
3
3
  var Connection;
4
4
  ((Connection2) => {
@@ -1,6 +1,6 @@
1
- import { a as LikeC4StylesConfig, b as LikeC4Theme, L as LikeC4StyleDefaults, U as ElementColorValues, V as RelationshipColorValues, D as ThemeColor, T as ThemeColorValues, p as TextSize, r as SpacingSize, q as ShapeSize } from './core.BnOetIAR.mjs';
1
+ import { L as LikeC4StylesConfig, a as LikeC4Theme, b as LikeC4StyleDefaults, E as ElementColorValues, R as RelationshipColorValues, T as ThemeColor, c as ThemeColorValues, d as TextSize, S as SpacingSize, e as ShapeSize } from './core.0zAQeenX.mjs';
2
2
  import { LiteralUnion } from 'type-fest';
3
- import { m as LikeC4ProjectStylesConfig, K as ComputedNodeStyle } from './core.BMtVqKl7.mjs';
3
+ import { L as LikeC4ProjectStylesConfig, C as ComputedNodeStyle } from './core.mUnpvHtA.mjs';
4
4
 
5
5
  /**
6
6
  * Styles of a LikeC4 project
@@ -1,8 +1,8 @@
1
1
  import { Tagged, NonEmptyTuple, IsNever, PartialDeep, WritableDeep, Except } from 'type-fest';
2
- import { s as BorderStyle, q as ShapeSize, r as SpacingSize, p as TextSize, Q as Color, u as ElementShape, v as RelationshipLineType, y as RelationshipArrowType, D as ThemeColor, C as ColorLiteral, I as CustomColorDefinitions, b as LikeC4Theme, L as LikeC4StyleDefaults } from './core.BnOetIAR.mjs';
3
- import { A as Any, s as WithOptionalTags, u as WithOptionalLinks, m as StrictViewId, j as _stage, k as _type, F as Fqn, R as RelationKind, W as WithDescriptionAndTech, v as WithMetadata, w as WithNotation, n as ElementKind, T as Tag, y as DeploymentKind, C as MetadataKey, G as WithTags, x as DeploymentFqn } from './core.CDOKQTW6.mjs';
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.0zAQeenX.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.B73yxfPi.mjs';
4
4
  import { N as NonEmptyArray, E as ExclusiveUnion, a as NonEmptyReadonlyArray, L as Link } from './core.DB0Ue5Wx.mjs';
5
- import { I as Icon, M as MarkdownOrString, d as RelationId, T as Tag$1, P as ProjectId, N as NodeId, j as EdgeId, m as StepEdgeKind } from './core.DX-WYEPA.mjs';
5
+ import { M as MarkdownOrString, I as Icon, d as RelationId, T as Tag$1, P as ProjectId, N as NodeId, j as EdgeId, m as StepEdgeKind } from './core.DX-WYEPA.mjs';
6
6
  import { FqnRef } from '../types/fqnRef.mjs';
7
7
  import { ModelExpression, ModelFqnExpr } from '../types/expression-model.mjs';
8
8
 
@@ -19,6 +19,10 @@ interface BBox {
19
19
  }
20
20
  declare namespace BBox {
21
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];
22
26
  function fromPoints(points: Point[]): BBox;
23
27
  function merge(...boxes: BBox[]): BBox;
24
28
  function fromRectBox(rect: RectBox): BBox;
@@ -112,7 +116,6 @@ type ViewManualLayout = {
112
116
  height: number;
113
117
  }>;
114
118
  readonly edges: Record<string, {
115
- dotpos?: string;
116
119
  points: NonEmptyArray<Point>;
117
120
  controlPoints?: NonEmptyArray<XYPoint>;
118
121
  labelBBox?: BBox;
@@ -418,6 +421,9 @@ interface LikeC4Project {
418
421
  * Custom styles
419
422
  */
420
423
  styles?: LikeC4ProjectStylesConfig | undefined;
424
+ /**
425
+ * Configuration for manual layouts snapshots
426
+ */
421
427
  manualLayouts?: LikeC4ProjectManualLayoutsConfig | undefined;
422
428
  }
423
429
 
@@ -525,4 +531,4 @@ interface ComputedDynamicView<A extends Any = Any> extends BaseComputedViewPrope
525
531
  readonly variant: DynamicViewDisplayVariant;
526
532
  }
527
533
 
528
- export { type DynamicStepsParallel as $, type AbstractRelationship as A, BBox as B, type ViewManualLayout as C, type ViewType as D, type ElementStyle as E, type BaseViewProperties as F, type GlobalPredicateId as G, type BaseParsedViewProperties as H, type ViewWithNotation as I, type ViewWithHash as J, type ComputedNodeStyle as K, type LikeC4ProjectTheme as L, type ModelGlobals as M, type NodeNotation as N, type ComputedNode as O, type Point as P, type ComputedEdge as Q, RectBox as R, type Specification as S, type TagSpecification as T, type ComputedElementView as U, type ViewRuleGlobalStyle as V, type ComputedDeploymentView as W, type XYPoint as X, type ComputedDynamicView as Y, type DynamicStep as Z, type DynamicStepsSeries as _, type GlobalPredicates as a, getParallelStepsPrefix as a0, type DynamicViewStep as a1, isDynamicStep as a2, isDynamicStepsParallel as a3, isDynamicStepsSeries as a4, type DynamicViewIncludeRule as a5, type DynamicViewRule as a6, type DynamicViewDisplayVariant as a7, type ParsedDynamicView as a8, type ElementViewIncludePredicate as a9, type ElementViewExcludePredicate as aa, type ElementViewPredicate as ab, type ElementViewRuleGroup as ac, isViewRuleGroup as ad, type ElementViewRuleStyle as ae, type ElementViewRule as af, type ParsedElementView as ag, type GlobalDynamicPredicates as b, type GlobalStyleID as c, type GlobalStyles as d, ensureSizes as e, type Element as f, type Relationship as g, type ModelRelation as h, type ElementSpecification as i, isTagColorSpecified as j, type RelationshipSpecification as k, type LikeC4ProjectStyleDefaults as l, type LikeC4ProjectStylesConfig as m, type LikeC4ProjectManualLayoutsConfig as n, type LikeC4Project as o, type AnyIncludePredicate as p, type AnyExcludePredicate as q, type AnyViewRuleStyle as r, isViewRuleGlobalStyle as s, type ViewRuleGlobalPredicateRef as t, isViewRuleGlobalPredicateRef as u, type AutoLayoutDirection as v, isAutoLayoutDirection as w, type ViewRuleAutoLayout as x, isViewRuleAutoLayout as y, type ViewAutoLayout as z };
534
+ export { type DynamicStepsParallel as $, type AbstractRelationship as A, BBox 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 Point as P, type ComputedEdge as Q, RectBox as R, type Specification as S, type TagSpecification as T, type ComputedElementView as U, type ViewRuleGlobalStyle as V, type ComputedDeploymentView as W, type XYPoint as X, type ComputedDynamicView as Y, type DynamicStep as Z, type DynamicStepsSeries as _, type GlobalPredicates as a, getParallelStepsPrefix as a0, type DynamicViewStep as a1, isDynamicStep as a2, isDynamicStepsParallel as a3, isDynamicStepsSeries as a4, type DynamicViewIncludeRule as a5, type DynamicViewRule as a6, type DynamicViewDisplayVariant as a7, type ParsedDynamicView as a8, type ElementViewIncludePredicate as a9, type ElementViewExcludePredicate as aa, type ElementViewPredicate as ab, type ElementViewRuleGroup as ac, isViewRuleGroup as ad, type ElementViewRuleStyle as ae, type ElementViewRule as af, type ParsedElementView as ag, type GlobalDynamicPredicates as b, type GlobalStyleID as c, type GlobalStyles as d, ensureSizes as e, type Element as f, type Relationship as g, type ModelRelation as h, type ElementSpecification as i, isTagColorSpecified as j, type RelationshipSpecification as k, type LikeC4ProjectTheme as l, type LikeC4ProjectStyleDefaults as m, type LikeC4ProjectManualLayoutsConfig as n, type LikeC4Project as o, type AnyIncludePredicate as p, type AnyExcludePredicate as q, type AnyViewRuleStyle as r, isViewRuleGlobalStyle as s, type ViewRuleGlobalPredicateRef as t, isViewRuleGlobalPredicateRef as u, type AutoLayoutDirection as v, isAutoLayoutDirection as w, type ViewRuleAutoLayout as x, isViewRuleAutoLayout as y, type ViewAutoLayout as z };
@@ -0,0 +1,13 @@
1
+ import { i as invariant } from './core.D4npX2q8.mjs';
2
+
3
+ function stringHash(str) {
4
+ let hash = 5381;
5
+ const len = str.length;
6
+ invariant(len > 0, "stringHash: empty string");
7
+ for (let i = 0; i < len; i++) {
8
+ hash = hash * 33 ^ str.charCodeAt(i);
9
+ }
10
+ return (hash >>> 0).toString(36);
11
+ }
12
+
13
+ export { stringHash as s };
@@ -1,6 +1,6 @@
1
- import { C as Connection, c as customInspectSymbol } from './core.BnDbAOR2.mjs';
2
- import { D as DeploymentElementModel, h as RelationshipsAccum, a as DeploymentNodeModel, R as RelationshipModel, c as DeploymentRelationModel } from './core.DjAM-S6a.mjs';
3
- import { A as Any, z as EdgeId } from './core.CDOKQTW6.mjs';
1
+ import { C as Connection, c as customInspectSymbol } from './core.Cog93roC.mjs';
2
+ import { e as DeploymentElementModel, h as RelationshipsAccum, D as DeploymentNodeModel, R as RelationshipModel, b as DeploymentRelationModel } from './core.CpURdWRM.mjs';
3
+ import { A as Any, z as EdgeId } from './core.B73yxfPi.mjs';
4
4
  import { c as IteratorLike } from './core.DB0Ue5Wx.mjs';
5
5
 
6
6
  /**