likec4 1.58.0 → 1.59.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 (63) hide show
  1. package/__app__/codegen/webcomponent.mjs +14 -14
  2. package/__app__/src/chunks/AIChat.mjs +153 -156
  3. package/__app__/src/chunks/LikeC4Styles.mjs +1553 -1255
  4. package/__app__/src/chunks/ProjectsOverview.mjs +127 -130
  5. package/__app__/src/chunks/hooks.mjs +419 -106
  6. package/__app__/src/chunks/libs/@floating-ui.mjs +8 -8
  7. package/__app__/src/chunks/libs/@mantine.mjs +3039 -2135
  8. package/__app__/src/chunks/libs/@tanstack-ai.mjs +4 -4
  9. package/__app__/src/chunks/libs/@tanstack.mjs +93 -118
  10. package/__app__/src/chunks/libs/@xstate/react.mjs +30 -16
  11. package/__app__/src/chunks/libs/@xyflow/react.mjs +50 -26
  12. package/__app__/src/chunks/libs/bezier-js.mjs +11 -8
  13. package/__app__/src/chunks/libs/framer.mjs +1188 -1155
  14. package/__app__/src/chunks/libs/zod.mjs +191 -188
  15. package/__app__/src/chunks/rolldown-runtime.mjs +8 -1
  16. package/__app__/src/chunks/styled-system.mjs +23 -16
  17. package/__app__/src/main.mjs +22275 -9432
  18. package/__app__/src/style.css +1 -1
  19. package/dist/chunks/dist.mjs +10 -0
  20. package/dist/chunks/enableServer.mjs +1 -1
  21. package/dist/chunks/index.d.mts +9 -9
  22. package/dist/chunks/index2.d.mts +386 -229
  23. package/dist/chunks/libs/@chevrotain/gast.mjs +1 -1
  24. package/dist/chunks/libs/@chevrotain/regexp-to-ast.mjs +1 -1
  25. package/dist/chunks/libs/@logtape/logtape.mjs +3 -3
  26. package/dist/chunks/libs/@ts-graphviz/common.d.mts +1 -2
  27. package/dist/chunks/libs/@ts-graphviz/core.mjs +1 -1
  28. package/dist/chunks/libs/chevrotain-allstar.mjs +1 -1
  29. package/dist/chunks/libs/chevrotain.mjs +4 -4
  30. package/dist/chunks/libs/json5.mjs +1 -1
  31. package/dist/chunks/libs/langium.d.mts +2940 -2914
  32. package/dist/chunks/libs/langium.mjs +9 -9
  33. package/dist/chunks/libs/merge-error-cause.mjs +1 -1
  34. package/dist/chunks/libs/p-queue.mjs +1 -1
  35. package/dist/chunks/libs/package-manager-detector.mjs +1 -1
  36. package/dist/chunks/libs/pako.mjs +1 -1
  37. package/dist/chunks/libs/picomatch.mjs +1 -1
  38. package/dist/chunks/libs/remeda.mjs +1 -1
  39. package/dist/chunks/libs/unstorage.d.mts +1 -0
  40. package/dist/chunks/libs/which.mjs +1 -1
  41. package/dist/chunks/libs/zod.d.mts +48 -36
  42. package/dist/chunks/libs/zod.mjs +4 -4
  43. package/dist/chunks/logger.mjs +1 -0
  44. package/dist/chunks/node.mjs +57 -66
  45. package/dist/chunks/rolldown-runtime.mjs +1 -1
  46. package/dist/chunks/sequence-view.mjs +1 -1
  47. package/dist/chunks/vite-plugin.mjs +43 -43
  48. package/dist/cli/index.mjs +159 -157
  49. package/dist/index.d.mts +2 -3
  50. package/dist/index.mjs +1 -1
  51. package/dist/model/index.d.mts +5 -4
  52. package/dist/vite-plugin/index.d.mts +6 -9
  53. package/dist/vite-plugin/internal/index.d.mts +15 -10
  54. package/package.json +37 -37
  55. package/react/index.d.mts +761 -111
  56. package/react/index.mjs +13974 -10232
  57. package/__app__/src/chunks/DiagramActorProvider.mjs +0 -7638
  58. package/__app__/src/chunks/Markdown.mjs +0 -146
  59. package/__app__/src/chunks/NavigationPanel.mjs +0 -61
  60. package/__app__/src/chunks/adhoc-editor.mjs +0 -3386
  61. package/__app__/src/chunks/libs/@dagrejs/dagre.mjs +0 -1894
  62. package/__app__/src/chunks/libs/@tabler/icons-react.mjs +0 -252
  63. package/__app__/src/chunks/libs/remeda.mjs +0 -642
package/dist/index.d.mts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { i as __name } from "./chunks/rolldown-runtime.mjs";
2
- import { t as LikeC4$1 } from "./chunks/index2.mjs";
2
+ import { n as writeDSL, r as LikeC4$1, t as WriteDSLOptions } from "./chunks/index2.mjs";
3
3
  export type * from "@likec4/core/types";
4
-
5
4
  //#region src/LikeC4.d.ts
6
5
  type LikeC4Options = {
7
6
  /**
@@ -49,4 +48,4 @@ declare namespace LikeC4 {
49
48
  function fromWorkspace(path?: string, _opts?: LikeC4Options): Promise<LikeC4>;
50
49
  }
51
50
  //#endregion
52
- export { LikeC4, type LikeC4Options };
51
+ export { LikeC4, type LikeC4Options, type WriteDSLOptions, writeDSL };
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{i as e}from"./chunks/rolldown-runtime.mjs";import{l as t,n,t as r}from"./chunks/node.mjs";import{exact as i}from"@likec4/core";let a;(function(a){async function fromSource$1(e,n){let{logger:a,watch:o,...s}=n??{};return r(e,t(i({...s,configureLogger:a}),{configureLogger:`console`}))}e(fromSource$1,`fromSource`),a.fromSource=fromSource$1;async function fromWorkspace$1(e=``,r){let{logger:a,watch:o,...s}=r??{};return n(e,t(i({...s,configureLogger:a}),{configureLogger:`console`}))}e(fromWorkspace$1,`fromWorkspace`),a.fromWorkspace=fromWorkspace$1})(a||={});export{a as LikeC4};
1
+ import{i as e}from"./chunks/rolldown-runtime.mjs";import{n as t}from"./chunks/sequence-view.mjs";import{n,r,t as i}from"./chunks/node.mjs";import{exact as a}from"@likec4/core";let o;(function(r){async function fromSource$1(e,n){let{logger:r,watch:o,...s}=n??{};return i(e,t(a({...s,configureLogger:r}),{configureLogger:`console`}))}e(fromSource$1,`fromSource`),r.fromSource=fromSource$1;async function fromWorkspace$1(e=``,r){let{logger:i,watch:o,...s}=r??{};return n(e,t(a({...s,configureLogger:i}),{configureLogger:`console`}))}e(fromWorkspace$1,`fromWorkspace`),r.fromWorkspace=fromWorkspace$1})(o||={});export{o as LikeC4,r as writeDSL};
@@ -1,10 +1,9 @@
1
1
  import { i as __name } from "../chunks/rolldown-runtime.mjs";
2
2
  import * as types from "@likec4/core/types";
3
- import { BBox, EdgeId, LayoutedDynamicView, NodeId, ViewId } from "@likec4/core/types";
3
+ import { BBox, LayoutedDynamicView, NodeId, ViewId } from "@likec4/core/types";
4
4
  import { Connection, ConnectionModel, DeployedInstanceModel, DeploymentConnectionModel, DeploymentElementModel, DeploymentNodeModel, DeploymentRelationEndpoint, DeploymentRelationModel, EdgeModel, ElementModel, LikeC4DeploymentModel, LikeC4Model, LikeC4Model as LikeC4Model$1, LikeC4ViewModel, NodeModel, RelationshipModel, deploymentConnection, differenceConnections, findAscendingConnections, findDeepestNestedConnection, findDescendantConnections, hasSameSource, hasSameSourceTarget, hasSameTarget, isAnyInOut, isDeployedInstanceModel, isDeploymentElementModel, isDeploymentNodeModel, isDeploymentRelationModel, isEdgeModel, isElementModel, isIncoming, isLikeC4ViewModel, isNestedConnection, isNestedElementOfDeployedInstanceModel, isNodeModel, isOutgoing, isRelationModel, mergeConnections, modelConnection, sortConnectionsByBoundaryHierarchy, sortDeepestFirst } from "@likec4/core/model";
5
5
  import { ComputedProjectEdge, ComputedProjectNode, ComputedProjectsView, LayoutedProjectEdge, LayoutedProjectNode, LayoutedProjectsView } from "@likec4/core/compute-view";
6
6
  export type * from "@likec4/core/types";
7
-
8
7
  //#region ../layouts/dist/sequence/index.d.mts
9
8
  //#region src/sequence/_types.d.ts
10
9
  interface SequenceActorStepPort {
@@ -14,6 +13,7 @@ interface SequenceActorStepPort {
14
13
  height: number;
15
14
  type: 'target' | 'source';
16
15
  position: 'left' | 'right' | 'top' | 'bottom';
16
+ hidden?: boolean;
17
17
  }
18
18
  interface SequenceActor {
19
19
  id: NodeId;
@@ -45,9 +45,10 @@ interface SequenceViewLayout {
45
45
  compounds: Array<SequenceCompound>;
46
46
  parallelAreas: Array<SequenceParallelArea>;
47
47
  bounds: BBox;
48
- } //#endregion
48
+ }
49
+ //#endregion
49
50
  //#region src/sequence/sequence-view.d.ts
50
- declare function calcSequenceLayout(view: LayoutedDynamicView): LayoutedDynamicView.Sequence.Layout; //#endregion
51
+ declare function calcSequenceLayout(view: LayoutedDynamicView): LayoutedDynamicView.Sequence.Layout;
51
52
  //#endregion
52
53
  //#region src/model/index.d.ts
53
54
  type UnknownLayouted = types.UnknownLayouted;
@@ -1,8 +1,9 @@
1
1
  import { i as __name } from "../chunks/rolldown-runtime.mjs";
2
- import { n as LikeC4LanguageServices } from "../chunks/index2.mjs";
2
+ import "../chunks/index.mjs";
3
+ import { i as LikeC4LanguageServices } from "../chunks/index2.mjs";
4
+ import "@likec4/core";
3
5
  import { PluginOption } from "vite";
4
6
  import { AnyTextAdapter } from "@tanstack/ai";
5
-
6
7
  //#region ../vite-plugin/dist/index.d.mts
7
8
  //#region src/virtuals/app-config.d.ts
8
9
  interface AppConfig {
@@ -26,7 +27,8 @@ interface AppConfig {
26
27
  * @default 'auto'
27
28
  */
28
29
  theme?: 'light' | 'dark' | undefined;
29
- } //#endregion
30
+ }
31
+ //#endregion
30
32
  //#region src/plugin.d.ts
31
33
  interface AIOptions<TAdapter extends AnyTextAdapter = AnyTextAdapter> {
32
34
  /**
@@ -136,11 +138,6 @@ type LikeC4VitePluginOptions = SharedOptions & ({
136
138
  watch?: never;
137
139
  logLevel?: never;
138
140
  });
139
- declare function LikeC4VitePlugin({
140
- environments,
141
- appConfig,
142
- ai: _ai,
143
- ...pluginOpts
144
- }: LikeC4VitePluginOptions): PluginOption; //#endregion
141
+ declare function LikeC4VitePlugin({ environments, appConfig, ai: _ai, ...pluginOpts }: LikeC4VitePluginOptions): PluginOption;
145
142
  //#endregion
146
143
  export { LikeC4VitePlugin, type LikeC4VitePluginOptions };
@@ -2,7 +2,6 @@ import { LikeC4Model } from "@likec4/core/model";
2
2
  import { DependencyList } from "react";
3
3
  import { LayoutedElementView, LayoutedLikeC4ModelData, LayoutedView, ProjectId, ViewChange, ViewId } from "@likec4/core/types";
4
4
  import { AdhocViewPredicate } from "@likec4/core/compute-view";
5
-
6
5
  //#region ../vite-plugin/dist/internal/index.d.mts
7
6
  //#region ../../node_modules/.pnpm/nanostores@1.3.0/node_modules/nanostores/atom/index.d.ts
8
7
  type AllKeys<T> = T extends any ? keyof T : never;
@@ -125,10 +124,11 @@ type Atom<Value = any> = ReadableAtom<Value> | WritableAtom<Value>;
125
124
  * @param initialValue Initial value of the store.
126
125
  * @returns The store object with methods to subscribe.
127
126
  */
128
- declare function atom<Value, StoreExt = object>(...args: undefined extends Value ? [] | [Value] : [Value]): PreinitializedWritableAtom<Value> & StoreExt; //#endregion
127
+ declare function atom<Value, StoreExt = object>(...args: undefined extends Value ? [] | [Value] : [Value]): PreinitializedWritableAtom<Value> & StoreExt;
128
+ //#endregion
129
129
  //#region ../../node_modules/.pnpm/nanostores@1.3.0/node_modules/nanostores/map/index.d.ts
130
130
  type KeyofBase = keyof any;
131
- type Get<T, K extends KeyofBase> = Extract<T, { [K1 in K]: any }>[K];
131
+ type Get<T, K extends KeyofBase> = Extract<T, { [K1 in K]: any; }>[K];
132
132
  type HasIndexSignature<T> = string extends keyof T ? true : false;
133
133
  type ValueWithUndefinedForIndexSignatures<Value, Key extends keyof Value> = HasIndexSignature<Value> extends true ? undefined | Value[Key] : Value[Key];
134
134
  type WritableStore<Value = any> = (Value extends object ? MapStore<Value> : never) | WritableAtom<Value>;
@@ -218,13 +218,15 @@ interface PreinitializedMapStore<Value extends object = any> extends MapStore<Va
218
218
  * @param init Initialize store and return store destructor.
219
219
  * @returns The store object with methods to subscribe.
220
220
  */
221
- declare function map<Value extends object, StoreExt extends object = object>(value?: Value): PreinitializedMapStore<Value> & StoreExt; //#endregion
221
+ declare function map<Value extends object, StoreExt extends object = object>(value?: Value): PreinitializedMapStore<Value> & StoreExt;
222
+ //#endregion
222
223
  //#region ../../node_modules/.pnpm/nanostores@1.3.0/node_modules/nanostores/task/index.d.ts
223
224
  interface Task<Value> extends Promise<Value> {
224
225
  t: true;
225
- } //#endregion
226
+ }
227
+ //#endregion
226
228
  //#region ../../node_modules/.pnpm/nanostores@1.3.0/node_modules/nanostores/computed/index.d.ts
227
- type StoreValues<Stores extends AnyStore[]> = { [Index in keyof Stores]: StoreValue<Stores[Index]> };
229
+ type StoreValues<Stores extends AnyStore[]> = { [Index in keyof Stores]: StoreValue<Stores[Index]>; };
228
230
  interface Computed {
229
231
  /**
230
232
  * @deprecated Use `@nanostores/async`.
@@ -271,7 +273,8 @@ interface Batched {
271
273
  */
272
274
  <Value, OriginStores extends AnyStore[]>(stores: [...OriginStores], cb: (...values: StoreValues<OriginStores>) => Task<Value> | Value): ReadableAtom<Value>;
273
275
  }
274
- declare const batched: Batched; //#endregion
276
+ declare const batched: Batched;
277
+ //#endregion
275
278
  //#region src/rpc/protocol.d.ts
276
279
  interface LikeC4VitePluginRpc {
277
280
  /**
@@ -301,7 +304,8 @@ interface LikeC4VitePluginRpc {
301
304
  projectId: ProjectId;
302
305
  predicates: AdhocViewPredicate[];
303
306
  }): Promise<LayoutedElementView>;
304
- } //#endregion
307
+ }
308
+ //#endregion
305
309
  //#region ../../node_modules/.pnpm/@nanostores+react@1.1.0_nanostores@1.3.0_react@19.2.7/node_modules/@nanostores/react/index.d.ts
306
310
  type StoreKeys<T> = T extends {
307
311
  setKey: (k: infer K, v: any) => unknown;
@@ -348,7 +352,8 @@ interface UseStoreOptions<SomeStore> {
348
352
  * @param store Store instance.
349
353
  * @returns Store value.
350
354
  */
351
- declare function useStore<SomeStore extends Store>(store: SomeStore, options?: UseStoreOptions<SomeStore>): StoreValue<SomeStore>; //#endregion
355
+ declare function useStore<SomeStore extends Store>(store: SomeStore, options?: UseStoreOptions<SomeStore>): StoreValue<SomeStore>;
356
+ //#endregion
352
357
  //#region src/internal.d.ts
353
358
  interface LikeC4VitePluginRpcOptions {
354
359
  /**
@@ -371,6 +376,6 @@ declare function createHooksForModel($atom: WritableAtom<LayoutedLikeC4ModelData
371
376
  useLikeC4Model: () => LikeC4Model.Layouted;
372
377
  useLikeC4Views: () => ReadonlyArray<LayoutedView>;
373
378
  useLikeC4View: (viewId: string) => LayoutedView | null;
374
- }; //#endregion
379
+ };
375
380
  //#endregion
376
381
  export { type Atom, type LikeC4VitePluginRpc, LikeC4VitePluginRpcOptions, type ReadableAtom, type WritableAtom, atom, batched, computed, createHooksForModel, createRpc, map, useStore };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "likec4",
3
3
  "description": "Toolchain for your architecture diagrams",
4
- "version": "1.58.0",
4
+ "version": "1.59.0",
5
5
  "license": "MIT",
6
6
  "homepage": "https://likec4.dev",
7
7
  "author": "Denis Davydkov <denis@davydkov.com>",
@@ -89,22 +89,22 @@
89
89
  "access": "public"
90
90
  },
91
91
  "dependencies": {
92
- "@hpcc-js/wasm-graphviz": "1.21.6",
93
- "@vitejs/plugin-react": "^6.0.2",
92
+ "@hpcc-js/wasm-graphviz": "1.22.2",
93
+ "@vitejs/plugin-react": "^6.0.3",
94
94
  "bundle-require": "^5.1.0",
95
- "esbuild": "0.28.0",
95
+ "esbuild": "0.28.1",
96
96
  "fdir": "6.4.0",
97
97
  "playwright": "1.60.0",
98
98
  "chokidar": "^5.0.0",
99
- "immer": "^11.1.8",
99
+ "immer": "^11.1.9",
100
100
  "std-env": "^4.1.0",
101
101
  "type-fest": "^4.41.0",
102
102
  "vite-plugin-singlefile": "^2.3.3",
103
- "vite": "^8.0.14",
103
+ "vite": "^8.1.3",
104
104
  "yargs": "17.7.2",
105
105
  "nano-spawn": "^2.1.0",
106
106
  "use-sync-external-store": "^1.6.0",
107
- "@likec4/core": "1.58.0",
107
+ "@likec4/core": "1.59.0",
108
108
  "@likec4/icons": "1.46.4"
109
109
  },
110
110
  "peerDependencies": {
@@ -114,8 +114,8 @@
114
114
  "@tanstack/ai-openai": "^0.8.2",
115
115
  "@tanstack/ai-ollama": "^0.6.10",
116
116
  "@tanstack/ai-openrouter": "^0.8.2",
117
- "react": "^19.x",
118
- "react-dom": "^19.x"
117
+ "react": "^19.2.x",
118
+ "react-dom": "^19.2.x"
119
119
  },
120
120
  "peerDependenciesMeta": {
121
121
  "@tanstack/ai": {
@@ -141,25 +141,25 @@
141
141
  "langium": "3.5.0",
142
142
  "@dagrejs/dagre": "1.1.8",
143
143
  "@fontsource-variable/ibm-plex-sans": "^5.2.8",
144
- "@pandacss/dev": "^1.11.1",
144
+ "@pandacss/dev": "^1.11.4",
145
145
  "@tanstack/ai": "^0.14.0",
146
146
  "@types/node": "~22.19.19",
147
147
  "@types/picomatch": "^4.0.3",
148
- "@types/react": "19.2.16",
148
+ "@types/react": "19.2.17",
149
149
  "@types/react-dom": "19.2.3",
150
150
  "@types/semver": "^7.7.1",
151
151
  "@types/yargs": "^17.0.33",
152
- "autoprefixer": "^10.5.0",
153
- "picomatch": "^4.0.4",
152
+ "autoprefixer": "^10.5.3",
153
+ "picomatch": "^4.0.5",
154
154
  "birpc": "^4.0.0",
155
155
  "boxen": "^8.0.1",
156
156
  "clsx": "^2.1.1",
157
157
  "conf": "^15.1.0",
158
158
  "defu": "^6.1.7",
159
- "esbuild-node-externals": "1.22.0",
159
+ "esbuild-node-externals": "1.23.1",
160
160
  "esm-env": "^1.2.2",
161
161
  "fast-equals": "^6.0.0",
162
- "get-port": "^7.1.0",
162
+ "get-port": "^7.2.0",
163
163
  "is-inside-container": "^1.0.0",
164
164
  "json5": "^2.2.3",
165
165
  "ky": "^1.14.3",
@@ -168,7 +168,7 @@
168
168
  "p-limit": "7.3.0",
169
169
  "nanostores": "1.3.0",
170
170
  "@nanostores/react": "1.1.0",
171
- "oxlint": "1.68.0",
171
+ "oxlint": "1.72.0",
172
172
  "package-manager-detector": "1.6.0",
173
173
  "package-up": "^5.0.0",
174
174
  "postcss": "8.5.15",
@@ -181,13 +181,13 @@
181
181
  "semver": "^7.8.1",
182
182
  "strip-indent": "^4.1.1",
183
183
  "tinyrainbow": "^3.1.0",
184
- "tsx": "4.22.4",
185
- "turbo": "2.9.16",
184
+ "tsx": "4.22.5",
185
+ "turbo": "2.10.5",
186
186
  "typescript": "6.0.3",
187
187
  "ufo": "1.6.4",
188
- "tsdown": "^0.22.1",
189
- "vite-plugin-dts": "^5.0.2",
190
- "vitest": "4.1.8",
188
+ "tsdown": "^0.22.9",
189
+ "vite-plugin-dts": "^5.0.3",
190
+ "vitest": "4.1.9",
191
191
  "vscode-jsonrpc": "8.2.0",
192
192
  "vscode-languageserver": "9.0.1",
193
193
  "vscode-languageserver-types": "3.17.5",
@@ -196,22 +196,22 @@
196
196
  "wireit": "0.14.12",
197
197
  "zod": "^4.4.3",
198
198
  "zx": "8.8.5",
199
- "@likec4/config": "1.58.0",
200
- "@likec4/leanix-bridge": "1.58.0",
201
- "@likec4/log": "1.58.0",
202
- "@likec4/language-services": "1.58.0",
203
- "@likec4/language-server": "1.58.0",
204
- "@likec4/mcp": "1.58.0",
205
- "@likec4/devops": "1.58.0",
206
- "@likec4/diagram": "1.58.0",
207
- "@likec4/layouts": "1.58.0",
208
- "@likec4/vite-plugin": "1.58.0",
209
- "@likec4/react": "1.58.0",
210
- "@likec4/style-preset": "1.58.0",
211
- "@likec4/generators": "1.58.0",
212
- "@likec4/spa": "1.58.0",
213
- "@likec4/styles": "1.58.0",
214
- "@likec4/tsconfig": "1.58.0"
199
+ "@likec4/config": "1.59.0",
200
+ "@likec4/leanix-bridge": "1.59.0",
201
+ "@likec4/language-server": "1.59.0",
202
+ "@likec4/language-services": "1.59.0",
203
+ "@likec4/mcp": "1.59.0",
204
+ "@likec4/log": "1.59.0",
205
+ "@likec4/diagram": "1.59.0",
206
+ "@likec4/devops": "1.59.0",
207
+ "@likec4/layouts": "1.59.0",
208
+ "@likec4/react": "1.59.0",
209
+ "@likec4/spa": "1.59.0",
210
+ "@likec4/vite-plugin": "1.59.0",
211
+ "@likec4/generators": "1.59.0",
212
+ "@likec4/style-preset": "1.59.0",
213
+ "@likec4/tsconfig": "1.59.0",
214
+ "@likec4/styles": "1.59.0"
215
215
  },
216
216
  "scripts": {
217
217
  "typecheck": "tsc --build --verbose",