@likec4/core 1.20.1 → 1.20.3

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 (79) hide show
  1. package/dist/builder/index.cjs +6 -6
  2. package/dist/builder/index.d.cts +3 -3
  3. package/dist/builder/index.d.mts +3 -3
  4. package/dist/builder/index.d.ts +3 -3
  5. package/dist/builder/index.mjs +6 -6
  6. package/dist/compute-view/index.cjs +5 -5
  7. package/dist/compute-view/index.d.cts +4 -4
  8. package/dist/compute-view/index.d.mts +4 -4
  9. package/dist/compute-view/index.d.ts +4 -4
  10. package/dist/compute-view/index.mjs +6 -6
  11. package/dist/index.cjs +71 -573
  12. package/dist/index.d.cts +9 -133
  13. package/dist/index.d.mts +9 -133
  14. package/dist/index.d.ts +9 -133
  15. package/dist/index.mjs +8 -512
  16. package/dist/model/index.cjs +1 -1
  17. package/dist/model/index.d.cts +5 -5
  18. package/dist/model/index.d.mts +5 -5
  19. package/dist/model/index.d.ts +5 -5
  20. package/dist/model/index.mjs +1 -1
  21. package/dist/shared/{core.DunIMHRf.mjs → core.0PxLtLpP.mjs} +1 -1
  22. package/dist/shared/{core.BvdNMbcA.d.cts → core.88YY6vtF.d.mts} +2 -2
  23. package/dist/shared/{core.CqCTxzMY.mjs → core.BG1hfxpq.mjs} +29 -620
  24. package/dist/shared/{core.ByNgh-mC.d.cts → core.BIZD3l1g.d.cts} +1 -1
  25. package/dist/shared/{core.D74xkKkG.d.ts → core.BJfn72tj.d.cts} +5 -0
  26. package/dist/shared/{core.D74xkKkG.d.cts → core.BJfn72tj.d.mts} +5 -0
  27. package/dist/shared/{core.D74xkKkG.d.mts → core.BJfn72tj.d.ts} +5 -0
  28. package/dist/shared/{core.M-JWF7SS.mjs → core.Bezy7K65.mjs} +1 -1
  29. package/dist/shared/{core.D_Gc58Gt.d.ts → core.Bs71hdR4.d.ts} +2 -1
  30. package/dist/shared/{core.D6-fWbM3.d.ts → core.BtISRjMA.d.ts} +1 -1
  31. package/dist/shared/{core.B72vUaNB.d.cts → core.C0ygs98j.d.cts} +2 -1
  32. package/dist/shared/core.CCyhaU-4.mjs +14819 -0
  33. package/dist/shared/{core.DsoCu540.cjs → core.CKYxnFEl.cjs} +1 -1
  34. package/dist/shared/{core.Damrzla-.d.ts → core.CNUzoKM7.d.ts} +2 -2
  35. package/dist/shared/{core.sLaWHBjR.d.mts → core.CajOK_t3.d.mts} +1 -1
  36. package/dist/shared/{core.BdbFkE_p.d.cts → core.Cmfo_N4F.d.mts} +3 -3
  37. package/dist/shared/{core.jy6z2iRn.d.mts → core.CwZmAghJ.d.cts} +3 -3
  38. package/dist/shared/{core.ZWiGANIJ.d.ts → core.D4wZW7zR.d.ts} +3 -3
  39. package/dist/shared/{core.BGus30EM.cjs → core.DRfrKNT6.cjs} +48 -643
  40. package/dist/shared/{core.gv1bMwCC.cjs → core.Db_OTRdC.cjs} +1 -1
  41. package/dist/shared/{core.Dfzrh1VA.d.mts → core.DjMYkPMQ.d.mts} +2 -1
  42. package/dist/shared/{core.m3rCQAv6.mjs → core.El-gigOM.mjs} +1 -1
  43. package/dist/shared/core.FACQZmma.cjs +14874 -0
  44. package/dist/shared/{core.BRuJ3Wzf.d.mts → core.Lh2RFJf1.d.cts} +2 -2
  45. package/dist/shared/{core.B2QYWlYe.cjs → core.uxHtIZaH.cjs} +1 -1
  46. package/dist/types/index.cjs +1 -1
  47. package/dist/types/index.d.cts +4 -4
  48. package/dist/types/index.d.mts +4 -4
  49. package/dist/types/index.d.ts +4 -4
  50. package/dist/types/index.mjs +1 -1
  51. package/dist/utils/index.cjs +6 -2
  52. package/dist/utils/index.d.cts +129 -145
  53. package/dist/utils/index.d.mts +129 -145
  54. package/dist/utils/index.d.ts +129 -145
  55. package/dist/utils/index.mjs +3 -3
  56. package/package.json +7 -6
  57. package/src/compute-view/deployment-view/clean-connections.ts +1 -1
  58. package/src/compute-view/deployment-view/stages/stage-final.ts +1 -1
  59. package/src/compute-view/element-view/__test__/fixture.ts +2 -0
  60. package/src/compute-view/element-view/compute.ts +1 -1
  61. package/src/compute-view/element-view/memory/memory.ts +3 -3
  62. package/src/compute-view/memory/ops.ts +1 -1
  63. package/src/compute-view/relationships-view/layout.ts +1 -1
  64. package/src/compute-view/relationships-view/utils.ts +1 -1
  65. package/src/compute-view/utils/applyCustomElementProperties.ts +9 -6
  66. package/src/compute-view/utils/applyViewRuleStyles.ts +7 -4
  67. package/src/index.ts +0 -8
  68. package/src/model/DeploymentModel.ts +1 -1
  69. package/src/model/LikeC4Model.ts +3 -3
  70. package/src/types/element.ts +7 -2
  71. package/src/types/expression.ts +1 -0
  72. package/src/utils/index.ts +2 -0
  73. package/src/utils/set.ts +5 -2
  74. package/dist/shared/core.BxvDITEI.mjs +0 -859
  75. package/dist/shared/core.C9DCnJh8.cjs +0 -908
  76. package/src/builder/Builder-style1.test-d.ts +0 -190
  77. package/src/builder/Builder-style2.test-d.ts +0 -175
  78. package/src/compute-view/utils/uniqueTags.test.ts +0 -42
  79. package/src/model/LikeC4Model.test-d.ts +0 -152
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- const model_index = require('../shared/core.BGus30EM.cjs');
4
- const object_hash = require('../shared/core.C9DCnJh8.cjs');
5
- const view = require('../shared/core.B2QYWlYe.cjs');
6
- const chunkRAAYCPUM = require('../shared/core.DsoCu540.cjs');
3
+ const model_index = require('../shared/core.DRfrKNT6.cjs');
4
+ const object_hash = require('../shared/core.FACQZmma.cjs');
5
+ const view = require('../shared/core.uxHtIZaH.cjs');
6
+ const chunkRAAYCPUM = require('../shared/core.CKYxnFEl.cjs');
7
7
 
8
8
  function n(...r){return chunkRAAYCPUM.u(Object.fromEntries,r)}
9
9
 
@@ -34,7 +34,7 @@ function _defu(baseObject, defaults, namespace = ".", merger) {
34
34
  continue;
35
35
  }
36
36
  const value = baseObject[key];
37
- if (value === null || value === void 0) {
37
+ if (value === null || value === undefined) {
38
38
  continue;
39
39
  }
40
40
  if (merger && merger(object, key, value, namespace)) {
@@ -126,7 +126,7 @@ function $include(...args) {
126
126
  return (b) => {
127
127
  let expr = b.$expr(args[0]);
128
128
  if (args.length === 2) {
129
- const condition = args[1].where ? parseWhere(args[1].where) : void 0;
129
+ const condition = args[1].where ? parseWhere(args[1].where) : undefined;
130
130
  if (condition) {
131
131
  expr = {
132
132
  where: {
@@ -1,7 +1,7 @@
1
1
  import { LastArrayElement, Split, Simplify, Writable, IfNever, Tagged, IsLiteral, IsStringLiteral as IsStringLiteral$1, TupleToUnion } from 'type-fest';
2
- import { L as LikeC4Model } from '../shared/core.BdbFkE_p.cjs';
3
- import { D as DeploymentElement, i as DeploymentRelation, at as ModelRelation, bs as ViewRuleStyle, aT as AutoLayoutDirection, bx as Participant, A as CustomElementExpr, B as CustomRelationExpr, X as ExpressionV2, N as Expression, L as LikeC4View, b0 as DeploymentView, bd as ElementView, ax as RelationshipKindSpecification, g as DeploymentNodeKindSpecification, av as RelationshipArrowType, ay as RelationshipLineType, a9 as ParsedLikeC4Model } from '../shared/core.B72vUaNB.cjs';
4
- import { F as Fqn, i as Element, N as NonEmptyArray, j as ElementKindSpecification, l as ElementShape, s as Color, h as BorderStyle, K as KeysOf } from '../shared/core.D74xkKkG.cjs';
2
+ import { L as LikeC4Model } from '../shared/core.CwZmAghJ.cjs';
3
+ import { D as DeploymentElement, i as DeploymentRelation, at as ModelRelation, bs as ViewRuleStyle, aT as AutoLayoutDirection, bx as Participant, A as CustomElementExpr, B as CustomRelationExpr, X as ExpressionV2, N as Expression, L as LikeC4View, b0 as DeploymentView, bd as ElementView, ax as RelationshipKindSpecification, g as DeploymentNodeKindSpecification, av as RelationshipArrowType, ay as RelationshipLineType, a9 as ParsedLikeC4Model } from '../shared/core.C0ygs98j.cjs';
4
+ import { F as Fqn, i as Element, N as NonEmptyArray, j as ElementKindSpecification, l as ElementShape, s as Color, h as BorderStyle, K as KeysOf } from '../shared/core.BJfn72tj.cjs';
5
5
  import { IsStringLiteral } from 'type-fest/source/is-literal';
6
6
 
7
7
  type ToNested$1<T, Id extends string> = T extends TypesNested<infer P, any, any, any, any, any, any, any, infer F> ? TypesNested<`${P}.${Id}`, T['ElementKind'], T['Fqn'], T['ViewId'], T['RelationshipKind'], T['Tag'], T['MetadataKey'], T['DeploymentKind'], `${P}.${Id}` | F> : T extends AnyTypes ? TypesNested<Id, T['ElementKind'], T['Fqn'], T['ViewId'], T['RelationshipKind'], T['Tag'], T['MetadataKey'], T['DeploymentKind'], Id | T['DeploymentFqn']> : never;
@@ -1,7 +1,7 @@
1
1
  import { LastArrayElement, Split, Simplify, Writable, IfNever, Tagged, IsLiteral, IsStringLiteral as IsStringLiteral$1, TupleToUnion } from 'type-fest';
2
- import { L as LikeC4Model } from '../shared/core.jy6z2iRn.mjs';
3
- import { D as DeploymentElement, i as DeploymentRelation, at as ModelRelation, bs as ViewRuleStyle, aT as AutoLayoutDirection, bx as Participant, A as CustomElementExpr, B as CustomRelationExpr, X as ExpressionV2, N as Expression, L as LikeC4View, b0 as DeploymentView, bd as ElementView, ax as RelationshipKindSpecification, g as DeploymentNodeKindSpecification, av as RelationshipArrowType, ay as RelationshipLineType, a9 as ParsedLikeC4Model } from '../shared/core.Dfzrh1VA.mjs';
4
- import { F as Fqn, i as Element, N as NonEmptyArray, j as ElementKindSpecification, l as ElementShape, s as Color, h as BorderStyle, K as KeysOf } from '../shared/core.D74xkKkG.mjs';
2
+ import { L as LikeC4Model } from '../shared/core.Cmfo_N4F.mjs';
3
+ import { D as DeploymentElement, i as DeploymentRelation, at as ModelRelation, bs as ViewRuleStyle, aT as AutoLayoutDirection, bx as Participant, A as CustomElementExpr, B as CustomRelationExpr, X as ExpressionV2, N as Expression, L as LikeC4View, b0 as DeploymentView, bd as ElementView, ax as RelationshipKindSpecification, g as DeploymentNodeKindSpecification, av as RelationshipArrowType, ay as RelationshipLineType, a9 as ParsedLikeC4Model } from '../shared/core.DjMYkPMQ.mjs';
4
+ import { F as Fqn, i as Element, N as NonEmptyArray, j as ElementKindSpecification, l as ElementShape, s as Color, h as BorderStyle, K as KeysOf } from '../shared/core.BJfn72tj.mjs';
5
5
  import { IsStringLiteral } from 'type-fest/source/is-literal';
6
6
 
7
7
  type ToNested$1<T, Id extends string> = T extends TypesNested<infer P, any, any, any, any, any, any, any, infer F> ? TypesNested<`${P}.${Id}`, T['ElementKind'], T['Fqn'], T['ViewId'], T['RelationshipKind'], T['Tag'], T['MetadataKey'], T['DeploymentKind'], `${P}.${Id}` | F> : T extends AnyTypes ? TypesNested<Id, T['ElementKind'], T['Fqn'], T['ViewId'], T['RelationshipKind'], T['Tag'], T['MetadataKey'], T['DeploymentKind'], Id | T['DeploymentFqn']> : never;
@@ -1,7 +1,7 @@
1
1
  import { LastArrayElement, Split, Simplify, Writable, IfNever, Tagged, IsLiteral, IsStringLiteral as IsStringLiteral$1, TupleToUnion } from 'type-fest';
2
- import { L as LikeC4Model } from '../shared/core.ZWiGANIJ.js';
3
- import { D as DeploymentElement, i as DeploymentRelation, at as ModelRelation, bs as ViewRuleStyle, aT as AutoLayoutDirection, bx as Participant, A as CustomElementExpr, B as CustomRelationExpr, X as ExpressionV2, N as Expression, L as LikeC4View, b0 as DeploymentView, bd as ElementView, ax as RelationshipKindSpecification, g as DeploymentNodeKindSpecification, av as RelationshipArrowType, ay as RelationshipLineType, a9 as ParsedLikeC4Model } from '../shared/core.D_Gc58Gt.js';
4
- import { F as Fqn, i as Element, N as NonEmptyArray, j as ElementKindSpecification, l as ElementShape, s as Color, h as BorderStyle, K as KeysOf } from '../shared/core.D74xkKkG.js';
2
+ import { L as LikeC4Model } from '../shared/core.D4wZW7zR.js';
3
+ import { D as DeploymentElement, i as DeploymentRelation, at as ModelRelation, bs as ViewRuleStyle, aT as AutoLayoutDirection, bx as Participant, A as CustomElementExpr, B as CustomRelationExpr, X as ExpressionV2, N as Expression, L as LikeC4View, b0 as DeploymentView, bd as ElementView, ax as RelationshipKindSpecification, g as DeploymentNodeKindSpecification, av as RelationshipArrowType, ay as RelationshipLineType, a9 as ParsedLikeC4Model } from '../shared/core.Bs71hdR4.js';
4
+ import { F as Fqn, i as Element, N as NonEmptyArray, j as ElementKindSpecification, l as ElementShape, s as Color, h as BorderStyle, K as KeysOf } from '../shared/core.BJfn72tj.js';
5
5
  import { IsStringLiteral } from 'type-fest/source/is-literal';
6
6
 
7
7
  type ToNested$1<T, Id extends string> = T extends TypesNested<infer P, any, any, any, any, any, any, any, infer F> ? TypesNested<`${P}.${Id}`, T['ElementKind'], T['Fqn'], T['ViewId'], T['RelationshipKind'], T['Tag'], T['MetadataKey'], T['DeploymentKind'], `${P}.${Id}` | F> : T extends AnyTypes ? TypesNested<Id, T['ElementKind'], T['Fqn'], T['ViewId'], T['RelationshipKind'], T['Tag'], T['MetadataKey'], T['DeploymentKind'], Id | T['DeploymentFqn']> : never;
@@ -1,7 +1,7 @@
1
- import { l, L as LikeC4Model, i, d } from '../shared/core.CqCTxzMY.mjs';
2
- import { b as t, m, p as parentFqn, c as isSameHierarchy, n as nameFromFqn, a as i$1, l as l$1, d as t$1 } from '../shared/core.BxvDITEI.mjs';
3
- import { b as isElementPredicateExpr, o, c as isScopedElementView, D as DeploymentElement, n as n$1, d as DefaultThemeColor, e as DefaultElementShape } from '../shared/core.DunIMHRf.mjs';
4
- import { u, i as invariant } from '../shared/core.M-JWF7SS.mjs';
1
+ import { l, L as LikeC4Model, i, d } from '../shared/core.BG1hfxpq.mjs';
2
+ import { b as t, m, p as parentFqn, c as isSameHierarchy, n as nameFromFqn, a as i$1, l as l$1, d as t$1 } from '../shared/core.CCyhaU-4.mjs';
3
+ import { b as isElementPredicateExpr, o, c as isScopedElementView, D as DeploymentElement, n as n$1, d as DefaultThemeColor, e as DefaultElementShape } from '../shared/core.0PxLtLpP.mjs';
4
+ import { u, i as invariant } from '../shared/core.Bezy7K65.mjs';
5
5
 
6
6
  function n(...r){return u(Object.fromEntries,r)}
7
7
 
@@ -32,7 +32,7 @@ function _defu(baseObject, defaults, namespace = ".", merger) {
32
32
  continue;
33
33
  }
34
34
  const value = baseObject[key];
35
- if (value === null || value === void 0) {
35
+ if (value === null || value === undefined) {
36
36
  continue;
37
37
  }
38
38
  if (merger && merger(object, key, value, namespace)) {
@@ -124,7 +124,7 @@ function $include(...args) {
124
124
  return (b) => {
125
125
  let expr = b.$expr(args[0]);
126
126
  if (args.length === 2) {
127
- const condition = args[1].where ? parseWhere(args[1].where) : void 0;
127
+ const condition = args[1].where ? parseWhere(args[1].where) : undefined;
128
128
  if (condition) {
129
129
  expr = {
130
130
  where: {
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- const model_index = require('../shared/core.BGus30EM.cjs');
4
- const compute = require('../shared/core.gv1bMwCC.cjs');
5
- const view = require('../shared/core.B2QYWlYe.cjs');
6
- const object_hash = require('../shared/core.C9DCnJh8.cjs');
7
- const chunkRAAYCPUM = require('../shared/core.DsoCu540.cjs');
3
+ const model_index = require('../shared/core.DRfrKNT6.cjs');
4
+ const compute = require('../shared/core.Db_OTRdC.cjs');
5
+ const view = require('../shared/core.uxHtIZaH.cjs');
6
+ const object_hash = require('../shared/core.FACQZmma.cjs');
7
+ const chunkRAAYCPUM = require('../shared/core.CKYxnFEl.cjs');
8
8
 
9
9
  function y(...t){return chunkRAAYCPUM.u(f,t)}function f(t,e){if(!object_hash.i(e,1))return {...t};if(!object_hash.i(e,2)){let{[e[0]]:r,...m}=t;return m}let o={...t};for(let r of e)delete o[r];return o}
10
10
 
@@ -1,8 +1,8 @@
1
- export { C as ComputeViewResult, c as computeView, a as computeViews, u as unsafeComputeView } from '../shared/core.BdbFkE_p.cjs';
2
- export { c as computeRelationshipsView } from '../shared/core.BvdNMbcA.cjs';
3
- import { L as LikeC4View, C as ComputedView, a as ComputedLikeC4Model } from '../shared/core.B72vUaNB.cjs';
1
+ export { C as ComputeViewResult, c as computeView, a as computeViews, u as unsafeComputeView } from '../shared/core.CwZmAghJ.cjs';
2
+ export { c as computeRelationshipsView } from '../shared/core.Lh2RFJf1.cjs';
3
+ import { L as LikeC4View, C as ComputedView, a as ComputedLikeC4Model } from '../shared/core.C0ygs98j.cjs';
4
4
  import 'type-fest';
5
- import '../shared/core.D74xkKkG.cjs';
5
+ import '../shared/core.BJfn72tj.cjs';
6
6
 
7
7
  /**
8
8
  * Resolve rules of extended views
@@ -1,8 +1,8 @@
1
- export { C as ComputeViewResult, c as computeView, a as computeViews, u as unsafeComputeView } from '../shared/core.jy6z2iRn.mjs';
2
- export { c as computeRelationshipsView } from '../shared/core.BRuJ3Wzf.mjs';
3
- import { L as LikeC4View, C as ComputedView, a as ComputedLikeC4Model } from '../shared/core.Dfzrh1VA.mjs';
1
+ export { C as ComputeViewResult, c as computeView, a as computeViews, u as unsafeComputeView } from '../shared/core.Cmfo_N4F.mjs';
2
+ export { c as computeRelationshipsView } from '../shared/core.88YY6vtF.mjs';
3
+ import { L as LikeC4View, C as ComputedView, a as ComputedLikeC4Model } from '../shared/core.DjMYkPMQ.mjs';
4
4
  import 'type-fest';
5
- import '../shared/core.D74xkKkG.mjs';
5
+ import '../shared/core.BJfn72tj.mjs';
6
6
 
7
7
  /**
8
8
  * Resolve rules of extended views
@@ -1,8 +1,8 @@
1
- export { C as ComputeViewResult, c as computeView, a as computeViews, u as unsafeComputeView } from '../shared/core.ZWiGANIJ.js';
2
- export { c as computeRelationshipsView } from '../shared/core.Damrzla-.js';
3
- import { L as LikeC4View, C as ComputedView, a as ComputedLikeC4Model } from '../shared/core.D_Gc58Gt.js';
1
+ export { C as ComputeViewResult, c as computeView, a as computeViews, u as unsafeComputeView } from '../shared/core.D4wZW7zR.js';
2
+ export { c as computeRelationshipsView } from '../shared/core.CNUzoKM7.js';
3
+ import { L as LikeC4View, C as ComputedView, a as ComputedLikeC4Model } from '../shared/core.Bs71hdR4.js';
4
4
  import 'type-fest';
5
- import '../shared/core.D74xkKkG.js';
5
+ import '../shared/core.BJfn72tj.js';
6
6
 
7
7
  /**
8
8
  * Resolve rules of extended views
@@ -1,9 +1,9 @@
1
- import { G as Graph, r, w as willCreateCycle, t as topologicalSortExports, l, i as i$1 } from '../shared/core.CqCTxzMY.mjs';
2
- export { c as computeView, a as computeViews, u as unsafeComputeView } from '../shared/core.CqCTxzMY.mjs';
3
- export { c as computeRelationshipsView } from '../shared/core.m3rCQAv6.mjs';
4
- import { i as isExtendsElementView, a as isElementView } from '../shared/core.DunIMHRf.mjs';
5
- import { a as i, m } from '../shared/core.BxvDITEI.mjs';
6
- import { u } from '../shared/core.M-JWF7SS.mjs';
1
+ import { G as Graph, r, w as willCreateCycle, t as topologicalSortExports, l, i as i$1 } from '../shared/core.BG1hfxpq.mjs';
2
+ export { c as computeView, a as computeViews, u as unsafeComputeView } from '../shared/core.BG1hfxpq.mjs';
3
+ export { c as computeRelationshipsView } from '../shared/core.El-gigOM.mjs';
4
+ import { i as isExtendsElementView, a as isElementView } from '../shared/core.0PxLtLpP.mjs';
5
+ import { a as i, m } from '../shared/core.CCyhaU-4.mjs';
6
+ import { u } from '../shared/core.Bezy7K65.mjs';
7
7
 
8
8
  function y(...t){return u(f,t)}function f(t,e){if(!i(e,1))return {...t};if(!i(e,2)){let{[e[0]]:r,...m}=t;return m}let o={...t};for(let r of e)delete o[r];return o}
9
9