likec4 1.19.1 → 1.19.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.
@@ -330,12 +330,20 @@ declare namespace RelationExpr {
330
330
  inout: FqnExpr<D, M>;
331
331
  };
332
332
  const isInOut: (expr: ExpressionV2) => expr is InOut;
333
+ type Where<D = Fqn, M = Fqn> = {
334
+ where: {
335
+ expr: ExpressionV2<D, M>;
336
+ condition: WhereOperator<string, string>;
337
+ };
338
+ };
339
+ const isWhere: (expr: ExpressionV2) => expr is Where;
333
340
  }
334
341
  type RelationExpr<D = Fqn, M = Fqn> = ExclusiveUnion<{
335
342
  Direct: RelationExpr.Direct<D, M>;
336
343
  Incoming: RelationExpr.Incoming<D, M>;
337
344
  Outgoing: RelationExpr.Outgoing<D, M>;
338
345
  InOut: RelationExpr.InOut<D, M>;
346
+ Where: RelationExpr.Where<D, M>;
339
347
  }>;
340
348
  /**
341
349
  * Represents a version 2 expression which can be one of several types.
@@ -351,6 +359,7 @@ type ExpressionV2<D = Fqn, M = Fqn> = ExclusiveUnion<{
351
359
  Incoming: RelationExpr.Incoming<D, M>;
352
360
  Outgoing: RelationExpr.Outgoing<D, M>;
353
361
  InOut: RelationExpr.InOut<D, M>;
362
+ RelationPredicateOrWhere: RelationExpr.Where<D, M>;
354
363
  }>;
355
364
  declare namespace ExpressionV2 {
356
365
  const isFqnExpr: (expr: ExpressionV2) => expr is FqnExpr;
@@ -755,6 +764,7 @@ interface DeployedInstance {
755
764
  readonly title?: string;
756
765
  readonly description?: string | null;
757
766
  readonly technology?: string | null;
767
+ readonly kind?: string | null;
758
768
  readonly tags?: NonEmptyArray<Tag> | null;
759
769
  readonly links?: NonEmptyArray<Link> | null;
760
770
  readonly style?: DeploymentElementStyle;
@@ -1081,6 +1091,7 @@ declare class RelationshipModel<M extends AnyAux = AnyAux> {
1081
1091
  get description(): string | null;
1082
1092
  get navigateTo(): LikeC4ViewModel<M> | null;
1083
1093
  get tags(): ReadonlyArray<Tag>;
1094
+ get kind(): string | null;
1084
1095
  get links(): ReadonlyArray<Link>;
1085
1096
  /**
1086
1097
  * Iterate over all views that include this relationship.
@@ -1315,6 +1326,7 @@ declare abstract class AbstractDeploymentElementModel<M extends AnyAux = AnyAux>
1315
1326
  get shape(): ElementShape;
1316
1327
  get color(): ThemeColor;
1317
1328
  get tags(): ReadonlyArray<Tag>;
1329
+ get kind(): DeploymentNodeKind | string | null;
1318
1330
  get description(): string | null;
1319
1331
  get technology(): string | null;
1320
1332
  get links(): ReadonlyArray<Link>;
@@ -1415,6 +1427,7 @@ declare class DeployedInstanceModel<M extends AnyAux = AnyAux> extends AbstractD
1415
1427
  get shape(): ElementShape;
1416
1428
  get color(): ThemeColor;
1417
1429
  get tags(): ReadonlyArray<Tag>;
1430
+ get kind(): string | null;
1418
1431
  get description(): string | null;
1419
1432
  get technology(): string | null;
1420
1433
  get links(): ReadonlyArray<Link>;
@@ -1455,6 +1468,7 @@ declare class DeploymentRelationModel<M extends AnyAux = AnyAux> {
1455
1468
  get technology(): string | null;
1456
1469
  get description(): string | null;
1457
1470
  get tags(): ReadonlyArray<Tag>;
1471
+ get kind(): RelationshipKind | null;
1458
1472
  get navigateTo(): LikeC4ViewModel<M> | null;
1459
1473
  get links(): ReadonlyArray<Link>;
1460
1474
  views(): IteratorLike<LikeC4ViewModel<M, ComputedDeploymentView>>;
@@ -330,12 +330,20 @@ declare namespace RelationExpr {
330
330
  inout: FqnExpr<D, M>;
331
331
  };
332
332
  const isInOut: (expr: ExpressionV2) => expr is InOut;
333
+ type Where<D = Fqn, M = Fqn> = {
334
+ where: {
335
+ expr: ExpressionV2<D, M>;
336
+ condition: WhereOperator<string, string>;
337
+ };
338
+ };
339
+ const isWhere: (expr: ExpressionV2) => expr is Where;
333
340
  }
334
341
  type RelationExpr<D = Fqn, M = Fqn> = ExclusiveUnion<{
335
342
  Direct: RelationExpr.Direct<D, M>;
336
343
  Incoming: RelationExpr.Incoming<D, M>;
337
344
  Outgoing: RelationExpr.Outgoing<D, M>;
338
345
  InOut: RelationExpr.InOut<D, M>;
346
+ Where: RelationExpr.Where<D, M>;
339
347
  }>;
340
348
  /**
341
349
  * Represents a version 2 expression which can be one of several types.
@@ -351,6 +359,7 @@ type ExpressionV2<D = Fqn, M = Fqn> = ExclusiveUnion<{
351
359
  Incoming: RelationExpr.Incoming<D, M>;
352
360
  Outgoing: RelationExpr.Outgoing<D, M>;
353
361
  InOut: RelationExpr.InOut<D, M>;
362
+ RelationPredicateOrWhere: RelationExpr.Where<D, M>;
354
363
  }>;
355
364
  declare namespace ExpressionV2 {
356
365
  const isFqnExpr: (expr: ExpressionV2) => expr is FqnExpr;
@@ -755,6 +764,7 @@ interface DeployedInstance {
755
764
  readonly title?: string;
756
765
  readonly description?: string | null;
757
766
  readonly technology?: string | null;
767
+ readonly kind?: string | null;
758
768
  readonly tags?: NonEmptyArray<Tag> | null;
759
769
  readonly links?: NonEmptyArray<Link> | null;
760
770
  readonly style?: DeploymentElementStyle;
@@ -1081,6 +1091,7 @@ declare class RelationshipModel<M extends AnyAux = AnyAux> {
1081
1091
  get description(): string | null;
1082
1092
  get navigateTo(): LikeC4ViewModel<M> | null;
1083
1093
  get tags(): ReadonlyArray<Tag>;
1094
+ get kind(): string | null;
1084
1095
  get links(): ReadonlyArray<Link>;
1085
1096
  /**
1086
1097
  * Iterate over all views that include this relationship.
@@ -1315,6 +1326,7 @@ declare abstract class AbstractDeploymentElementModel<M extends AnyAux = AnyAux>
1315
1326
  get shape(): ElementShape;
1316
1327
  get color(): ThemeColor;
1317
1328
  get tags(): ReadonlyArray<Tag>;
1329
+ get kind(): DeploymentNodeKind | string | null;
1318
1330
  get description(): string | null;
1319
1331
  get technology(): string | null;
1320
1332
  get links(): ReadonlyArray<Link>;
@@ -1415,6 +1427,7 @@ declare class DeployedInstanceModel<M extends AnyAux = AnyAux> extends AbstractD
1415
1427
  get shape(): ElementShape;
1416
1428
  get color(): ThemeColor;
1417
1429
  get tags(): ReadonlyArray<Tag>;
1430
+ get kind(): string | null;
1418
1431
  get description(): string | null;
1419
1432
  get technology(): string | null;
1420
1433
  get links(): ReadonlyArray<Link>;
@@ -1455,6 +1468,7 @@ declare class DeploymentRelationModel<M extends AnyAux = AnyAux> {
1455
1468
  get technology(): string | null;
1456
1469
  get description(): string | null;
1457
1470
  get tags(): ReadonlyArray<Tag>;
1471
+ get kind(): RelationshipKind | null;
1458
1472
  get navigateTo(): LikeC4ViewModel<M> | null;
1459
1473
  get links(): ReadonlyArray<Link>;
1460
1474
  views(): IteratorLike<LikeC4ViewModel<M, ComputedDeploymentView>>;
@@ -330,12 +330,20 @@ declare namespace RelationExpr {
330
330
  inout: FqnExpr<D, M>;
331
331
  };
332
332
  const isInOut: (expr: ExpressionV2) => expr is InOut;
333
+ type Where<D = Fqn, M = Fqn> = {
334
+ where: {
335
+ expr: ExpressionV2<D, M>;
336
+ condition: WhereOperator<string, string>;
337
+ };
338
+ };
339
+ const isWhere: (expr: ExpressionV2) => expr is Where;
333
340
  }
334
341
  type RelationExpr<D = Fqn, M = Fqn> = ExclusiveUnion<{
335
342
  Direct: RelationExpr.Direct<D, M>;
336
343
  Incoming: RelationExpr.Incoming<D, M>;
337
344
  Outgoing: RelationExpr.Outgoing<D, M>;
338
345
  InOut: RelationExpr.InOut<D, M>;
346
+ Where: RelationExpr.Where<D, M>;
339
347
  }>;
340
348
  /**
341
349
  * Represents a version 2 expression which can be one of several types.
@@ -351,6 +359,7 @@ type ExpressionV2<D = Fqn, M = Fqn> = ExclusiveUnion<{
351
359
  Incoming: RelationExpr.Incoming<D, M>;
352
360
  Outgoing: RelationExpr.Outgoing<D, M>;
353
361
  InOut: RelationExpr.InOut<D, M>;
362
+ RelationPredicateOrWhere: RelationExpr.Where<D, M>;
354
363
  }>;
355
364
  declare namespace ExpressionV2 {
356
365
  const isFqnExpr: (expr: ExpressionV2) => expr is FqnExpr;
@@ -755,6 +764,7 @@ interface DeployedInstance {
755
764
  readonly title?: string;
756
765
  readonly description?: string | null;
757
766
  readonly technology?: string | null;
767
+ readonly kind?: string | null;
758
768
  readonly tags?: NonEmptyArray<Tag> | null;
759
769
  readonly links?: NonEmptyArray<Link> | null;
760
770
  readonly style?: DeploymentElementStyle;
@@ -1081,6 +1091,7 @@ declare class RelationshipModel<M extends AnyAux = AnyAux> {
1081
1091
  get description(): string | null;
1082
1092
  get navigateTo(): LikeC4ViewModel<M> | null;
1083
1093
  get tags(): ReadonlyArray<Tag>;
1094
+ get kind(): string | null;
1084
1095
  get links(): ReadonlyArray<Link>;
1085
1096
  /**
1086
1097
  * Iterate over all views that include this relationship.
@@ -1315,6 +1326,7 @@ declare abstract class AbstractDeploymentElementModel<M extends AnyAux = AnyAux>
1315
1326
  get shape(): ElementShape;
1316
1327
  get color(): ThemeColor;
1317
1328
  get tags(): ReadonlyArray<Tag>;
1329
+ get kind(): DeploymentNodeKind | string | null;
1318
1330
  get description(): string | null;
1319
1331
  get technology(): string | null;
1320
1332
  get links(): ReadonlyArray<Link>;
@@ -1415,6 +1427,7 @@ declare class DeployedInstanceModel<M extends AnyAux = AnyAux> extends AbstractD
1415
1427
  get shape(): ElementShape;
1416
1428
  get color(): ThemeColor;
1417
1429
  get tags(): ReadonlyArray<Tag>;
1430
+ get kind(): string | null;
1418
1431
  get description(): string | null;
1419
1432
  get technology(): string | null;
1420
1433
  get links(): ReadonlyArray<Link>;
@@ -1455,6 +1468,7 @@ declare class DeploymentRelationModel<M extends AnyAux = AnyAux> {
1455
1468
  get technology(): string | null;
1456
1469
  get description(): string | null;
1457
1470
  get tags(): ReadonlyArray<Tag>;
1471
+ get kind(): RelationshipKind | null;
1458
1472
  get navigateTo(): LikeC4ViewModel<M> | null;
1459
1473
  get links(): ReadonlyArray<Link>;
1460
1474
  views(): IteratorLike<LikeC4ViewModel<M, ComputedDeploymentView>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "likec4",
3
- "version": "1.19.1",
3
+ "version": "1.19.2",
4
4
  "license": "MIT",
5
5
  "homepage": "https://likec4.dev",
6
6
  "author": "Denis Davydkov <denis@davydkov.com>",
@@ -113,15 +113,15 @@
113
113
  "vite": "5.4.11"
114
114
  },
115
115
  "devDependencies": {
116
- "@fontsource/ibm-plex-sans": "^5.1.0",
117
- "@likec4/core": "1.19.1",
118
- "@likec4/diagram": "1.19.1",
119
- "@likec4/generators": "1.19.1",
120
- "@likec4/icons": "1.19.1",
121
- "@likec4/language-server": "1.19.1",
122
- "@likec4/layouts": "1.19.1",
123
- "@likec4/log": "1.19.1",
124
- "@likec4/tsconfig": "1.19.1",
116
+ "@fontsource/ibm-plex-sans": "^5.1.1",
117
+ "@likec4/core": "1.19.2",
118
+ "@likec4/diagram": "1.19.2",
119
+ "@likec4/generators": "1.19.2",
120
+ "@likec4/icons": "1.19.2",
121
+ "@likec4/language-server": "1.19.2",
122
+ "@likec4/layouts": "1.19.2",
123
+ "@likec4/log": "1.19.2",
124
+ "@likec4/tsconfig": "1.19.2",
125
125
  "@mantine/core": "7.15.2",
126
126
  "@mantine/hooks": "7.15.2",
127
127
  "@mantine/spotlight": "7.15.2",
@@ -188,5 +188,5 @@
188
188
  "vitest": "^2.1.8",
189
189
  "yargs": "17.7.2"
190
190
  },
191
- "packageManager": "yarn@4.5.3"
191
+ "packageManager": "yarn@4.6.0"
192
192
  }
package/react/index.d.ts CHANGED
@@ -307,12 +307,20 @@ declare namespace RelationExpr {
307
307
  inout: FqnExpr<D, M>;
308
308
  };
309
309
  const isInOut: (expr: ExpressionV2) => expr is InOut;
310
+ type Where<D = Fqn, M = Fqn> = {
311
+ where: {
312
+ expr: ExpressionV2<D, M>;
313
+ condition: WhereOperator<string, string>;
314
+ };
315
+ };
316
+ const isWhere: (expr: ExpressionV2) => expr is Where;
310
317
  }
311
318
  type RelationExpr<D = Fqn, M = Fqn> = ExclusiveUnion<{
312
319
  Direct: RelationExpr.Direct<D, M>;
313
320
  Incoming: RelationExpr.Incoming<D, M>;
314
321
  Outgoing: RelationExpr.Outgoing<D, M>;
315
322
  InOut: RelationExpr.InOut<D, M>;
323
+ Where: RelationExpr.Where<D, M>;
316
324
  }>;
317
325
  type ExpressionV2<D = Fqn, M = Fqn> = ExclusiveUnion<{
318
326
  Wildcard: FqnExpr.Wildcard;
@@ -322,6 +330,7 @@ type ExpressionV2<D = Fqn, M = Fqn> = ExclusiveUnion<{
322
330
  Incoming: RelationExpr.Incoming<D, M>;
323
331
  Outgoing: RelationExpr.Outgoing<D, M>;
324
332
  InOut: RelationExpr.InOut<D, M>;
333
+ RelationPredicateOrWhere: RelationExpr.Where<D, M>;
325
334
  }>;
326
335
  declare namespace ExpressionV2 {
327
336
  const isFqnExpr: (expr: ExpressionV2) => expr is FqnExpr;
package/react/index.js CHANGED
@@ -37214,7 +37214,7 @@ const jJ = (e, n) => e.id === n.id && De(e.selected ?? !1, n.selected ?? !1) &&
37214
37214
  }
37215
37215
  const [N, L] = Ok();
37216
37216
  !r && !C && (P = N ?? P);
37217
- const z = Array.isArray(P) && P.includes("hovered"), F = f && (n && !r || z), [A] = iS(F, F ? 500 : 300), D = Dk(_, k, {
37217
+ const z = Array.isArray(P) && P.includes("hovered"), F = f && (n && !r || z), [A] = iS(F, F ? 500 : 1e3), D = Dk(_, k, {
37218
37218
  selectedScaleBy: 0,
37219
37219
  hoveredScaleBy: 0,
37220
37220
  tapScaleBy: -10
@@ -37385,7 +37385,7 @@ const jJ = (e, n) => e.id === n.id && De(e.selected ?? !1, n.selected ?? !1) &&
37385
37385
  }
37386
37386
  const [S, C] = Ok();
37387
37387
  !o && !g && (b = S ?? b);
37388
- const E = !!S && S.includes("hovered"), _ = i && !o || E, [k] = iS(_, _ ? 500 : 300), P = Lk({
37388
+ const E = !!S && S.includes("hovered"), _ = i && !o || E, [k] = iS(_, _ ? 500 : 1e3), P = Lk({
37389
37389
  element: r,
37390
37390
  viewId: c,
37391
37391
  className: pX,