likec4 1.19.0 → 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "likec4",
3
- "version": "1.19.0",
3
+ "version": "1.19.2",
4
4
  "license": "MIT",
5
5
  "homepage": "https://likec4.dev",
6
6
  "author": "Denis Davydkov <denis@davydkov.com>",
@@ -26,18 +26,25 @@
26
26
  "types": "./dist/index.d.mts",
27
27
  "import": "./dist/index.mjs",
28
28
  "default": "./dist/index.mjs"
29
+ },
30
+ "require": {
31
+ "types": "./dist/index.d.cts",
32
+ "default": "./dist/index.cjs"
29
33
  }
30
34
  },
31
35
  "./model": {
32
- "development": "./src/model/index.ts",
33
- "default": {
36
+ "sources": "./src/model/index.ts",
37
+ "import": {
34
38
  "types": "./dist/model/index.d.mts",
35
- "import": "./dist/model/index.mjs",
36
39
  "default": "./dist/model/index.mjs"
40
+ },
41
+ "require": {
42
+ "types": "./dist/model/index.d.cts",
43
+ "default": "./dist/model/index.cjs"
37
44
  }
38
45
  },
39
46
  "./react": {
40
- "development": "./app/react/components/index.ts",
47
+ "sources": "./app/react/components/index.ts",
41
48
  "default": {
42
49
  "types": "./react/index.d.ts",
43
50
  "import": "./react/index.js",
@@ -86,8 +93,8 @@
86
93
  "dev:example-cloud": "run cli:serve ../../examples/cloud-system",
87
94
  "dev:failed": "run cli:serve ../../examples/failed",
88
95
  "dev:example-dev": "run cli:serve ../../examples/diagrams-dev/likec4",
89
- "cli": "tsx --conditions=development src/cli/index.ts",
90
- "cli:serve": "tsx watch --conditions=development src/cli/index.ts serve",
96
+ "cli": "tsx --conditions=sources src/cli/index.ts",
97
+ "cli:serve": "tsx watch --conditions=sources src/cli/index.ts serve",
91
98
  "cli:build": "run cli build -o dev/dist dev",
92
99
  "cli:preview": "run cli preview -o dev/dist dev",
93
100
  "cli:export": "run cli export png -o dev/export dev",
@@ -106,15 +113,15 @@
106
113
  "vite": "5.4.11"
107
114
  },
108
115
  "devDependencies": {
109
- "@fontsource/ibm-plex-sans": "^5.1.0",
110
- "@likec4/core": "1.19.0",
111
- "@likec4/diagram": "1.19.0",
112
- "@likec4/generators": "1.19.0",
113
- "@likec4/icons": "1.19.0",
114
- "@likec4/language-server": "1.19.0",
115
- "@likec4/layouts": "1.19.0",
116
- "@likec4/log": "1.19.0",
117
- "@likec4/tsconfig": "1.19.0",
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",
118
125
  "@mantine/core": "7.15.2",
119
126
  "@mantine/hooks": "7.15.2",
120
127
  "@mantine/spotlight": "7.15.2",
@@ -181,5 +188,5 @@
181
188
  "vitest": "^2.1.8",
182
189
  "yargs": "17.7.2"
183
190
  },
184
- "packageManager": "yarn@4.5.3"
191
+ "packageManager": "yarn@4.6.0"
185
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,