likec4 1.41.0 → 1.42.1

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 (42) hide show
  1. package/__app__/src/likec4.js +11520 -11895
  2. package/__app__/src/main.js +185 -129
  3. package/__app__/src/style.css +1 -1
  4. package/__app__/src/vendors.js +38559 -17023
  5. package/__app__/src/webcomponent.js +68 -0
  6. package/config/package.json +2 -2
  7. package/config/schema.json +575 -0
  8. package/dist/cli/index.mjs +569 -564
  9. package/dist/config/index.d.mts +4 -1
  10. package/dist/config/index.mjs +1 -1
  11. package/dist/index.d.mts +4 -4
  12. package/dist/index.mjs +1 -1
  13. package/dist/model/index.d.mts +47 -4
  14. package/dist/model/index.mjs +1 -1
  15. package/dist/shared/likec4.B5Q51Z1F.mjs +543 -0
  16. package/dist/shared/likec4.BCSBNe4z.d.mts +6808 -0
  17. package/dist/shared/likec4.BEwUtMsL.mjs +256 -0
  18. package/dist/shared/likec4.CB2-Uaub.mjs +47 -0
  19. package/dist/shared/{likec4.3AlS7pfZ.d.mts → likec4.CaOUU1HJ.d.mts} +204 -149
  20. package/dist/shared/likec4.D51sTGt6.mjs +4038 -0
  21. package/dist/shared/likec4.DOUP9ptn.mjs +1 -0
  22. package/dist/shared/{likec4.C8C0fF8a.mjs → likec4.DO_7oUns.mjs} +1 -1
  23. package/dist/vite-plugin/index.d.mts +4 -3
  24. package/dist/vite-plugin/index.mjs +1 -1
  25. package/dist/vite-plugin/internal.mjs +3 -3
  26. package/icons/all/package.json +4 -0
  27. package/model/builder/package.json +4 -0
  28. package/model/package.json +4 -0
  29. package/package.json +41 -41
  30. package/react/index.d.ts +6637 -0
  31. package/react/index.js +48759 -0
  32. package/react/package.json +3 -2
  33. package/vite-plugin/package.json +2 -2
  34. package/vite-plugin-modules.d.ts +5 -5
  35. package/__app__/src/webcomponent.tsx +0 -81
  36. package/dist/shared/likec4.CdNNo2L4.mjs +0 -1
  37. package/dist/shared/likec4.CxmGAh_J.mjs +0 -144
  38. package/dist/shared/likec4.DX1wM3Or.d.mts +0 -1704
  39. package/dist/shared/likec4.Db3cTW-C.mjs +0 -257
  40. package/dist/shared/likec4.bxIrQhth.mjs +0 -4174
  41. package/react/index.d.mts +0 -6578
  42. package/react/index.mjs +0 -185
@@ -0,0 +1 @@
1
+ function i(r,t,e){let n=o=>r(o,...t);return e===void 0?n:Object.assign(n,{lazy:e,lazyArgs:t})}function u(r,t,e){let n=r.length-t.length;if(n===0)return r(...t);if(n===1)return i(r,t,e);throw Error("Wrong number of arguments")}function f(...r){return u(l,r)}function l(r,t){let e={};for(let[n,o]of Object.entries(r))e[n]=t(o,n,r);return e}export{f as a,i as e,u as t};
@@ -1,2 +1,2 @@
1
- import{t as s}from"./likec4.CdNNo2L4.mjs";function l(...e){return s(f,e)}function f(e,r){if(e===r||Object.is(e,r))return!0;if(typeof e!="object"||typeof r!="object"||e===null||r===null||Object.getPrototypeOf(e)!==Object.getPrototypeOf(r))return!1;if(Array.isArray(e))return a(e,r);if(e instanceof Map)return c(e,r);if(e instanceof Set)return g(e,r);if(e instanceof Date)return e.getTime()===r.getTime();if(e instanceof RegExp)return e.toString()===r.toString();if(Object.keys(e).length!==Object.keys(
1
+ import{t as s}from"./likec4.DOUP9ptn.mjs";function l(...e){return s(f,e)}function f(e,r){if(e===r||Object.is(e,r))return!0;if(typeof e!="object"||typeof r!="object"||e===null||r===null||Object.getPrototypeOf(e)!==Object.getPrototypeOf(r))return!1;if(Array.isArray(e))return a(e,r);if(e instanceof Map)return c(e,r);if(e instanceof Set)return g(e,r);if(e instanceof Date)return e.getTime()===r.getTime();if(e instanceof RegExp)return e.toString()===r.toString();if(Object.keys(e).length!==Object.keys(
2
2
  r).length)return!1;for(let[t,n]of Object.entries(e))if(!(t in r)||!f(n,r[t]))return!1;return!0}function a(e,r){if(e.length!==r.length)return!1;for(let[t,n]of e.entries())if(!f(n,r[t]))return!1;return!0}function c(e,r){if(e.size!==r.size)return!1;for(let[t,n]of e.entries())if(!r.has(t)||!f(n,r.get(t)))return!1;return!0}function g(e,r){if(e.size!==r.size)return!1;let t=[...r];for(let n of e){let i=!1;for(let[u,o]of t.entries())if(f(n,o)){i=!0,t.splice(u,1);break}if(!i)return!1}return!0}export{l as t};
@@ -1,9 +1,10 @@
1
- import { L as LikeC4LanguageServices } from '../shared/likec4.3AlS7pfZ.mjs';
1
+ import '../shared/likec4.BCSBNe4z.mjs';
2
+ import { L as LikeC4LanguageServices } from '../shared/likec4.CaOUU1HJ.mjs';
2
3
  import '@likec4/core';
3
- import 'type-fest';
4
- import '../shared/likec4.DX1wM3Or.mjs';
5
4
  import '@likec4/core/model';
6
5
  import '@likec4/core/types';
6
+ import 'type-fest';
7
+ import '@likec4/core/styles';
7
8
  import '@likec4/core/utils';
8
9
 
9
10
  type LikeC4VitePluginOptions = {
@@ -1 +1 @@
1
- export{L as LikeC4VitePlugin}from"../shared/likec4.Db3cTW-C.mjs";
1
+ export{L as LikeC4VitePlugin}from"../shared/likec4.BEwUtMsL.mjs";
@@ -1,7 +1,7 @@
1
- import{LikeC4Model as U}from"@likec4/core/model";import{useRef as _,useCallback as x,useSyncExternalStore as R,useState as A,useEffect as V}from"react";import{t as L}from"../shared/likec4.C8C0fF8a.mjs";import{a as C}from"../shared/likec4.CdNNo2L4.mjs";let T=Symbol("clean"),a=[],o=0;const m=4;let g=0,M=e=>{let n=[],t={get(){return t.lc||t.listen(()=>{})(),t.value},lc:0,listen(l){return t.lc=n.push(l),()=>{for(let u=o+m;u<a.length;)a[u]===l?a.splice(u,m):u+=m;let i=n.indexOf(l);~i&&(n.splice(i,1),
1
+ import{LikeC4Model as U}from"@likec4/core/model";import{useRef as _,useCallback as x,useSyncExternalStore as R,useState as A,useEffect as V}from"react";import{t as L}from"../shared/likec4.DO_7oUns.mjs";import{a as C}from"../shared/likec4.DOUP9ptn.mjs";let T=Symbol("clean"),a=[],o=0;const m=4;let g=0,M=e=>{let n=[],t={get(){return t.lc||t.listen(()=>{})(),t.value},lc:0,listen(l){return t.lc=n.push(l),()=>{for(let u=o+m;u<a.length;)a[u]===l?a.splice(u,m):u+=m;let i=n.indexOf(l);~i&&(n.splice(i,1),
2
2
  --t.lc||t.off())}},notify(l,i){g++;let u=!a.length;for(let r of n)a.push(r,t.value,l,i);if(u){for(o=0;o<a.length;o+=m)a[o](a[o+1],a[o+2],a[o+3]);a.length=0}},off(){},set(l){let i=t.value;i!==l&&(t.value=l,t.notify(i))},subscribe(l){let i=t.listen(l);return l(t.value),i},value:e};return process.env.NODE_ENV!=="production"&&(t[T]=()=>{n=[],t.lc=0,t.off()}),t};const I=5,v=6,E=10;let D=(e,n,t,l)=>(e.events=e.events||{},e.events[t+E]||(e.events[t+E]=l(i=>{e.events[t].reduceRight((u,r)=>(r(u),u),{shared:{},
3
3
  ...i})})),e.events[t]=e.events[t]||[],e.events[t].push(n),()=>{let i=e.events[t],u=i.indexOf(n);i.splice(u,1),i.length||(delete e.events[t],e.events[t+E](),delete e.events[t+E])}),Q=1e3,b=(e,n)=>D(e,l=>{let i=n(l);i&&e.events[v].push(i)},I,l=>{let i=e.listen;e.listen=(...r)=>(!e.lc&&!e.active&&(e.active=!0,l()),i(...r));let u=e.off;if(e.events[v]=[],e.off=()=>{u(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let r of e.events[v])r();e.events[v]=[]}},Q)},process.env.NODE_ENV!=="production"){
4
4
  let r=e[T];e[T]=()=>{for(let s of e.events[v])s();e.events[v]=[],e.active=!1,r()}}return()=>{e.listen=i,e.off=u}}),w=(e,n,t)=>{Array.isArray(e)||(e=[e]);let l,i,u=()=>{if(i===g)return;i=g;let c=e.map(f=>f.get());if(!l||c.some((f,h)=>f!==l[h])){l=c;let f=n(...c);f&&f.then&&f.t?f.then(h=>{l===c&&r.set(h)}):(r.set(f),i=g)}},r=M(void 0),s=r.get;r.get=()=>(u(),s());let d,p=t?()=>{clearTimeout(d),d=setTimeout(u)}:u;return b(r,()=>{let c=e.map(f=>f.listen(p));return u(),()=>{for(let f of c)f()}}),r},N=(e,n)=>w(
5
5
  e,n),k=(e,n)=>w(e,n,!0);function q(e,n,t){let l=new Set(n).add(void 0);return e.listen((i,u,r)=>{l.has(r)&&t(i,u,r)})}let F=(e={})=>{let n=M(e);return n.setKey=function(t,l){let i=n.value;typeof l>"u"&&t in n.value?(n.value={...n.value},delete n.value[t],n.notify(i,t)):n.value[t]!==l&&(n.value={...n.value,[t]:l},n.notify(i,t))},n},O=(e,n)=>t=>{e.current!==t&&(e.current=t,n())};function S(e,{keys:n,deps:t=[e,n]}={}){let l=_();l.current=e.get();let i=x(r=>(O(l,r)(e.value),n?.length>0?q(e,n,O(l,r)):
6
- e.listen(O(l,r))),t),u=()=>l.current;return R(i,u,u)}const H=e=>{const n=N(e,s=>U.create(s));function t(s){const d=e.get();if(L(d,s))return;const p={...s,views:C(s.views,c=>{const f=d.views[c.id];return L(f,c)?f:c})};e.set(p)}const l=N(e,s=>[...Object.values(s.views)]);function i(){return S(n)}function u(){return S(l)}function r(s){const[d,p]=A(e.value?.views[s]??null);return V(()=>e.subscribe(c=>{p(c.views[s]??null)}),[s]),d}return{updateModel:t,$likec4model:n,useLikeC4Model:i,useLikeC4Views:u,
7
- useLikeC4View:r}};export{M as atom,k as batched,N as computed,H as createHooksForModel,F as map,S as useStore};
6
+ e.listen(O(l,r))),t),u=()=>l.current;return R(i,u,u)}const H=e=>{const n=N(e,s=>U.create(s));function t(s){const d=e.get();if(L(d,s))return;const p={...s,views:C(s.views,c=>{const f=d.views[c.id];return L(f,c)?f:c})};e.set(p)}const l=N(e,s=>Object.values(s.views));function i(){return S(n)}function u(){return S(l)}function r(s){const[d,p]=A(e.value?.views[s]??null);return V(()=>e.subscribe(c=>{p(c.views[s]??null)}),[s]),d}return{updateModel:t,$likec4model:n,useLikeC4Model:i,useLikeC4Views:u,useLikeC4View:r}};
7
+ export{M as atom,k as batched,N as computed,H as createHooksForModel,F as map,S as useStore};
@@ -0,0 +1,4 @@
1
+ {
2
+ "types": "../all.d.ts",
3
+ "module": "../all.js"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "types": "../../dist/model/builder.d.mts",
3
+ "module": "../../dist/model/builder.mjs"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "types": "../dist/model/index.d.mts",
3
+ "module": "../dist/model/index.mjs"
4
+ }
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.41.0",
4
+ "version": "1.42.1",
5
5
  "license": "MIT",
6
6
  "homepage": "https://likec4.dev",
7
7
  "author": "Denis Davydkov <denis@davydkov.com>",
@@ -20,7 +20,7 @@
20
20
  "graph"
21
21
  ],
22
22
  "engines": {
23
- "node": "~20.19.0 || ~22.18.0 || ~24.5.0 || ~24.7.0"
23
+ "node": "^20.19.0 || >=22.18.0"
24
24
  },
25
25
  "engineStrict": true,
26
26
  "bugs": "https://github.com/likec4/likec4/issues",
@@ -35,6 +35,7 @@
35
35
  "default": "./dist/index.mjs"
36
36
  }
37
37
  },
38
+ "./config/schema.json": "./config/schema.json",
38
39
  "./config": {
39
40
  "sources": "./src/config/index.ts",
40
41
  "default": {
@@ -62,9 +63,8 @@
62
63
  "./react": {
63
64
  "sources": "./react/index.ts",
64
65
  "default": {
65
- "types": "./react/index.d.mts",
66
- "import": "./react/index.mjs",
67
- "default": "./react/index.mjs"
66
+ "types": "./react/index.d.ts",
67
+ "default": "./react/index.js"
68
68
  }
69
69
  },
70
70
  "./vite-plugin-modules": {
@@ -92,8 +92,6 @@
92
92
  "import": "./icons/*",
93
93
  "default": "./icons/*"
94
94
  },
95
- "./src": "./src/index.ts",
96
- "./src/*": "./src/*",
97
95
  "./package.json": "./package.json"
98
96
  },
99
97
  "publishConfig": {
@@ -102,17 +100,20 @@
102
100
  },
103
101
  "dependencies": {
104
102
  "@hpcc-js/wasm-graphviz": "1.12.0",
105
- "@vitejs/plugin-react": "^4.7.0",
103
+ "@vitejs/plugin-react": "^5.0.4",
104
+ "boxen": "^8.0.1",
106
105
  "bundle-require": "^5.1.0",
107
106
  "esbuild": "0.25.9",
108
- "boxen": "^8.0.1",
107
+ "fdir": "6.4.0",
109
108
  "playwright": "1.54.2",
110
- "rollup": "^4.44.0",
111
- "type-fest": "^4.41.0",
112
- "vite": "^6.3.6",
109
+ "rollup": "^4.52.3",
113
110
  "std-env": "^3.9.0",
111
+ "type-fest": "^4.41.0",
112
+ "vite": "^7.1.7",
113
+ "@xyflow/react": "12.8.6",
114
+ "@xyflow/system": "0.0.70",
114
115
  "yargs": "17.7.2",
115
- "@likec4/core": "1.41.0"
116
+ "@likec4/core": "1.42.1"
116
117
  },
117
118
  "peerDependencies": {
118
119
  "react": "^18.x || ^19.x",
@@ -120,26 +121,23 @@
120
121
  },
121
122
  "devDependencies": {
122
123
  "@dagrejs/dagre": "1.1.5",
123
- "@fontsource/ibm-plex-sans": "^5.2.6",
124
- "@mantine/core": "8.2.8",
125
- "@mantine/hooks": "8.2.8",
124
+ "@fontsource/ibm-plex-sans": "^5.2.7",
125
+ "@mantine/core": "8.3.1",
126
+ "@mantine/hooks": "8.3.1",
126
127
  "@nanostores/react": "1.0.0",
127
- "@pandacss/dev": "^1.3.0",
128
+ "@pandacss/dev": "^1.4.1",
128
129
  "@react-hookz/web": "^25.1.1",
129
- "@tabler/icons-react": "3.34.1",
130
+ "@tabler/icons-react": "3.35.0",
130
131
  "@tanstack/react-router": "^1.114.13",
131
132
  "@tanstack/router-cli": "^1.114.13",
132
133
  "@tanstack/router-vite-plugin": "^1.114.13",
133
134
  "@types/node": "~20.19.11",
134
135
  "@types/picomatch": "^4.0.2",
135
- "@types/react": "19.1.12",
136
+ "@types/react": "19.1.16",
136
137
  "@types/react-dom": "19.1.9",
137
138
  "@types/semver": "^7.7.1",
138
139
  "@types/yargs": "^17.0.33",
139
- "@xyflow/react": "12.8.4",
140
- "@xyflow/system": "0.0.68",
141
140
  "autoprefixer": "^10.4.21",
142
- "classnames": "^2.5.1",
143
141
  "clsx": "^2.1.1",
144
142
  "conf": "^13.1.0",
145
143
  "defu": "^6.1.4",
@@ -147,7 +145,6 @@
147
145
  "esbuild-node-externals": "1.18.0",
148
146
  "esm-env": "^1.2.2",
149
147
  "fast-equals": "^5.2.2",
150
- "fdir": "6.4.0",
151
148
  "get-port": "^7.1.0",
152
149
  "html-to-image": "1.11.11",
153
150
  "is-inside-container": "^1.0.0",
@@ -156,14 +153,14 @@
156
153
  "langium": "3.5.0",
157
154
  "merge-error-cause": "^5.0.2",
158
155
  "mkdirp": "^3.0.1",
159
- "motion": "^12.23.12",
156
+ "motion": "^12.23.22",
160
157
  "nano-spawn": "^1.0.3",
161
158
  "nanostores": "1.0.1",
162
159
  "npm-run-all2": "^8.0.4",
163
160
  "p-limit": "6.2.0",
161
+ "picomatch": "^4.0.3",
164
162
  "package-manager-detector": "1.3.0",
165
163
  "package-up": "^5.0.0",
166
- "picomatch": "^4.0.3",
167
164
  "postcss": "8.5.6",
168
165
  "pretty-ms": "^9.2.0",
169
166
  "react": "19.1.1",
@@ -171,12 +168,12 @@
171
168
  "react-error-boundary": "^6.0.0",
172
169
  "react-resizable-panels": "^3.0.5",
173
170
  "react-shadow": "^20.6.0",
174
- "remeda": "^2.30.0",
171
+ "remeda": "^2.31.1",
175
172
  "semver": "^7.7.2",
176
173
  "strip-indent": "^4.0.0",
177
174
  "tinyrainbow": "^2.0.0",
178
- "tsx": "4.20.5",
179
- "turbo": "2.5.6",
175
+ "tsx": "4.20.6",
176
+ "turbo": "2.5.8",
180
177
  "typescript": "5.9.2",
181
178
  "ufo": "1.6.1",
182
179
  "unbuild": "3.5.0",
@@ -190,16 +187,18 @@
190
187
  "vscode-uri": "3.1.0",
191
188
  "which": "^5.0.0",
192
189
  "wireit": "0.14.12",
193
- "@likec4/diagram": "1.41.0",
194
- "@likec4/generators": "1.41.0",
195
- "@likec4/language-server": "1.41.0",
196
- "@likec4/icons": "1.41.0",
197
- "@likec4/layouts": "1.41.0",
198
- "@likec4/config": "1.41.0",
199
- "@likec4/log": "1.41.0",
200
- "@likec4/style-preset": "1.41.0",
201
- "@likec4/styles": "1.41.0",
202
- "@likec4/tsconfig": "1.41.0"
190
+ "zod": "^3.25.76",
191
+ "@likec4/devops": "1.42.0",
192
+ "@likec4/diagram": "1.42.1",
193
+ "@likec4/generators": "1.42.1",
194
+ "@likec4/config": "1.42.1",
195
+ "@likec4/icons": "1.42.1",
196
+ "@likec4/language-server": "1.42.1",
197
+ "@likec4/layouts": "1.42.1",
198
+ "@likec4/style-preset": "1.42.1",
199
+ "@likec4/styles": "1.42.1",
200
+ "@likec4/log": "1.42.1",
201
+ "@likec4/tsconfig": "1.42.1"
203
202
  },
204
203
  "scripts": {
205
204
  "typecheck": "tsc --build --verbose",
@@ -220,6 +219,7 @@
220
219
  "dev:docs:index-page": "pnpm cli:serve ../../apps/docs/src/components/index-page",
221
220
  "dev:docs:theme": "pnpm cli:serve ../../apps/docs/src/components/likec4-theme",
222
221
  "dev:playground:deployment": "pnpm cli:serve ../../apps/playground/src/examples/deployment",
222
+ "dev:playground:dynamic": "pnpm cli:serve ../../apps/playground/src/examples/dynamic",
223
223
  "dev:template": "pnpm cli:serve ../create-likec4/template",
224
224
  "dev:e2e": "pnpm cli:serve ../../e2e/src",
225
225
  "dev:example-cloud": "pnpm cli:serve ../../examples/cloud-system",
@@ -227,7 +227,7 @@
227
227
  "dev:example-dev": "pnpm cli:serve ../../examples/diagrams-dev/likec4",
228
228
  "dev:examples": "pnpm cli:serve ../../examples",
229
229
  "cli": "tsx --conditions=sources src/cli/index.ts",
230
- "cli:serve": "BUNDLE_REQUIRE_PRESERVE=1 tsx watch --conditions=sources --exclude=\"./../../examples/**/*.{js,ts,mjs}\" src/cli/index.ts serve",
230
+ "cli:serve": "tsx watch --conditions=sources --exclude=\"./../../{examples,e2e}/**/*.{js,ts,mjs}\" src/cli/index.ts serve",
231
231
  "cli:build": "pnpm cli build -o dev/dist dev",
232
232
  "cli:preview": "pnpm cli preview -o dev/dist dev",
233
233
  "cli:export": "pnpm cli export png -o dev/export dev",
@@ -236,6 +236,6 @@
236
236
  "vitest:ui": "vitest --no-isolate --ui",
237
237
  "test:watch": "vitest"
238
238
  },
239
- "types": "./dist/index.d.mts",
240
- "module": "./dist/index.mjs"
239
+ "types": "dist/index.d.mts",
240
+ "module": "dist/index.mjs"
241
241
  }