@likec4/core 0.22.0 → 0.24.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/colors.js CHANGED
@@ -92,3 +92,4 @@ export const Colors = {
92
92
  loContrast: '#c7d2fe'
93
93
  }
94
94
  };
95
+ //# sourceMappingURL=colors.js.map
@@ -32,3 +32,4 @@ export class EdgeBuilder {
32
32
  .reverse();
33
33
  }
34
34
  }
35
+ //# sourceMappingURL=EdgeBuilder.js.map
@@ -23,3 +23,4 @@ export class ComputeCtx {
23
23
  return new ComputeCtx(this.index, this.root, elements ? new Set(difference([...this.elements], elements)) : this.elements, relations ? new Set(difference([...this.relations], relations)) : this.relations, newImplicits);
24
24
  }
25
25
  }
26
+ //# sourceMappingURL=compute-ctx.js.map
@@ -5,7 +5,6 @@ import { isViewRuleAutoLayout, isViewRuleExpression, isViewRuleStyle } from '../
5
5
  import { compareByFqnHierarchically, failExpectedNever, ignoreNeverInRuntime, isAncestor, isSameHierarchy, parentFqn, Relations } from '../utils';
6
6
  import { hasRelation, isAnyInOut, isBetween, isIncoming, isInside, isOutgoing } from '../utils/relations';
7
7
  import { EdgeBuilder } from './EdgeBuilder';
8
- import { sortNodes } from './utils/sortNodes';
9
8
  import { ComputeCtx } from './compute-ctx';
10
9
  import { anyPossibleRelations } from './utils/anyPossibleRelations';
11
10
  import invariant from 'tiny-invariant';
@@ -463,7 +462,7 @@ export function computeElementView(view, index) {
463
462
  }
464
463
  return edge;
465
464
  });
466
- const nodes = applyViewRuleStyles(view.rules.filter(isViewRuleStyle), sortNodes(nodesreg, edges));
465
+ const nodes = applyViewRuleStyles(view.rules.filter(isViewRuleStyle), [...nodesreg.values()].sort(compareByFqnHierarchically));
467
466
  const autoLayoutRule = view.rules.find(isViewRuleAutoLayout);
468
467
  return {
469
468
  ...view,
@@ -472,3 +471,4 @@ export function computeElementView(view, index) {
472
471
  edges
473
472
  };
474
473
  }
474
+ //# sourceMappingURL=compute-element-view.js.map
@@ -12,3 +12,4 @@ export function computeViews(model) {
12
12
  views: map(v => computeElementView(v, index), model.views)
13
13
  };
14
14
  }
15
+ //# sourceMappingURL=compute.js.map
@@ -1 +1,2 @@
1
1
  export { computeView, computeViews } from './compute';
2
+ //# sourceMappingURL=index.js.map
@@ -10,3 +10,4 @@ export function* anyPossibleRelations(elements) {
10
10
  }
11
11
  }
12
12
  }
13
+ //# sourceMappingURL=anyPossibleRelations.js.map
@@ -40,3 +40,4 @@ export function sortNodes(_nodes, edges) {
40
40
  }
41
41
  return nodes;
42
42
  }
43
+ //# sourceMappingURL=sortNodes.js.map
package/dist/index.js CHANGED
@@ -2,3 +2,4 @@ export * from './compute-view';
2
2
  export * from './utils';
3
3
  export * from './model-index';
4
4
  export * from './colors';
5
+ //# sourceMappingURL=index.js.map
@@ -141,3 +141,4 @@ export class ModelIndex {
141
141
  return this._defaultElementView.get(id) ?? [];
142
142
  };
143
143
  }
144
+ //# sourceMappingURL=ModelIndex.js.map
@@ -1 +1,2 @@
1
1
  export * from './ModelIndex';
2
+ //# sourceMappingURL=index.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=computed-view.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=diagram.js.map
@@ -3,3 +3,4 @@ export function Fqn(name, parent) {
3
3
  }
4
4
  export const DefaultThemeColor = 'primary';
5
5
  export const DefaultElementShape = 'rectangle';
6
+ //# sourceMappingURL=element.js.map
@@ -28,3 +28,4 @@ export function isOutgoing(expr) {
28
28
  export function isAnyRelation(expr) {
29
29
  return isRelation(expr) || isInOut(expr) || isIncoming(expr) || isOutgoing(expr);
30
30
  }
31
+ //# sourceMappingURL=expression.js.map
@@ -1,2 +1,3 @@
1
1
  export { Fqn, DefaultThemeColor, DefaultElementShape } from './element';
2
2
  export { isViewRuleExpression, isViewRuleStyle } from './view';
3
+ //# sourceMappingURL=index.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=model.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=opaque.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=relation.js.map
@@ -7,3 +7,4 @@ export function isViewRuleStyle(rule) {
7
7
  export function isViewRuleAutoLayout(rule) {
8
8
  return 'autoLayout' in rule;
9
9
  }
10
+ //# sourceMappingURL=view.js.map
@@ -29,3 +29,4 @@ export const computeNodeLevels = ({ nodes }) => {
29
29
  }
30
30
  return nodeLevels;
31
31
  };
32
+ //# sourceMappingURL=compute-node-levels.js.map
package/dist/utils/fqn.js CHANGED
@@ -70,3 +70,4 @@ export const compareFqnHierarchically = (a, b) => {
70
70
  export const compareByFqnHierarchically = (a, b) => {
71
71
  return compareFqnHierarchically(a.id, b.id);
72
72
  };
73
+ //# sourceMappingURL=fqn.js.map
@@ -8,3 +8,4 @@ export function ignoreNeverInRuntime(arg) {
8
8
  console.warn(`Unexpected and ignored value: ${JSON.stringify(arg)}`);
9
9
  // throw new Error(`Unexpected value: ${arg}`);
10
10
  }
11
+ //# sourceMappingURL=guards.js.map
@@ -2,3 +2,4 @@ export * from './fqn';
2
2
  export * from './guards';
3
3
  export * from './compute-node-levels';
4
4
  export * as Relations from './relations';
5
+ //# sourceMappingURL=index.js.map
@@ -40,3 +40,4 @@ export const hasRelation = (rel) => {
40
40
  return isAncestor(rel.source, element.id) || isAncestor(rel.target, element.id);
41
41
  };
42
42
  };
43
+ //# sourceMappingURL=relations.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@likec4/core",
3
- "version": "0.22.0",
3
+ "version": "0.24.0",
4
4
  "license": "MIT",
5
5
  "bugs": "https://github.com/likec4/likec4/issues",
6
6
  "homepage": "https://likec4.dev",