likec4 1.24.1 → 1.25.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.
- package/__app__/index.html +1 -1
- package/__app__/src/chunks/{-index-overview-u7lEihT1.js → -index-overview-BQqR8e0d.js} +2 -2
- package/__app__/src/chunks/{main-CSfHpw_A.js → main-iM8EmCL0.js} +7072 -7041
- package/__app__/src/chunks/{mantine-Z8I_Wyle.js → mantine-B7q9iXnB.js} +98 -96
- package/__app__/src/main.js +1 -1
- package/__app__/src/style.css +1 -1
- package/dist/cli/index.mjs +3 -3
- package/dist/index.d.mts +11 -6
- package/dist/index.d.ts +11 -6
- package/dist/index.mjs +1 -1
- package/dist/shared/{likec4.D4N3up-s.mjs → likec4.DX7xzn9M.mjs} +1328 -1327
- package/package.json +12 -12
- package/react/index.d.ts +27 -1
- package/react/index.js +477 -446
- package/react/style.css +1 -1
package/dist/cli/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{c as pt,f as Ep,m as mt,g as Ji,a as Dp,b as Ba,T as vp,N as xa,i as $p,n as Xi,C as _p,d as wp,e as Ma,h as qa,t as Ua,p as bp,u as K,l as Ap,w as Cp,j as Sp,k as Rp,o as zt,q as Ha,r as Va,L as gt,s as Op,v as yt,x as Ip,y as Fp,z as Pp,A as dr,B as za,D as Np,E as Sr,F as Qi,G as Ga,H as Tp,Q as Lp}from"../shared/likec4.
|
|
2
|
+
import{c as pt,f as Ep,m as mt,g as Ji,a as Dp,b as Ba,T as vp,N as xa,i as $p,n as Xi,C as _p,d as wp,e as Ma,h as qa,t as Ua,p as bp,u as K,l as Ap,w as Cp,j as Sp,k as Rp,o as zt,q as Ha,r as Va,L as gt,s as Op,v as yt,x as Ip,y as Fp,z as Pp,A as dr,B as za,D as Np,E as Sr,F as Qi,G as Ga,H as Tp,Q as Lp}from"../shared/likec4.DX7xzn9M.mjs";import Te,{hrtime as jp,cwd as Zi,exit as Wa,stdout as kp,argv as Bp}from"node:process";import{strictEqual as xp,notStrictEqual as Mp}from"assert";import es,{
|
|
3
3
|
resolve as Qe,dirname as ts,normalize as qp,relative as Up,extname as Hp,basename as Vp}from"path";import{statSync as Ka,readdirSync as zp,readFileSync as rs,writeFile as Gp}from"fs";import Ya,{format as Ja,inspect as Wp}from"util";import{fileURLToPath as Kp}from"url";import be,{resolve as De,dirname as Gt,join as Rr,relative as Wt,extname as Or,isAbsolute as ns,basename as on}from"node:path";import ge,{existsSync as Pt,copyFileSync as Xa,readdirSync as Yp,rmSync as is}from"node:fs";import{mkdtemp as an,
|
|
4
4
|
writeFile as Kt,mkdir as $t,stat as ss,copyFile as Jp,rm as Xp}from"node:fs/promises";import Ir,{tmpdir as un}from"node:os";import{fileURLToPath as Qa}from"node:url";import Za from"@vitejs/plugin-react";import{sortNaturalByFqn as eu,compareNatural as Qp,hasAtLeast as Zp,invariant as os,nonexhaustive as tu,delay as ru}from"@likec4/core";import{build as Fr,createServer as em,preview as tm}from"vite";import{chromium as nu}from"playwright";import rm from"node:net";import{setTimeout as nm}from"node:timers/promises";
|
|
5
5
|
import{promisify as Me,isDeepStrictEqual as im}from"node:util";import Pr from"node:crypto";import sm from"node:assert";import"tty";import"os";import"crypto";import"net";import"child_process";import"@likec4/core/types";import"events";import"buffer";import"@hpcc-js/wasm-graphviz";import"@likec4/core/compute-view";import"@likec4/core/utils";import"boxen";import"node:child_process";import"node:events";import"node:stream/promises";import"fs/promises";import"@likec4/core/model";const om={right:dm,center:hm},
|
|
@@ -243,8 +243,8 @@ r==="directory"&&a?.isDirectory())return o}catch{}i=be.dirname(i)}}function l0({
|
|
|
243
243
|
${e.join(`
|
|
244
244
|
`)}`),new Error("likec4 app root does not exist");return r}async function Os(){const t=await an(Rr(un(),".likec4-public-"));return await Kt(Rr(t,"likec4-views.js"),`// generated by likec4
|
|
245
245
|
`),t}const Is=1e4;function Fs(){const t=zu();return{"likec4/icons":De(t,"icons"),"likec4/react":De(t,"react"),"likec4/model":De(t,"dist/model")}}var Ps={},Gu;function Ns(){return Gu||(Gu=1,function(t){t.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1,t.find=(e,r)=>e.nodes.find(n=>n.type===r),t.exceedsLimit=(e,r,n=1,i)=>i===!1||!t.isInteger(e)||!t.isInteger(r)?!1:(Number(r)-Number(e))/Number(n)>=i,t.escapeNode=(e,r=0,n)=>{const i=e.
|
|
246
|
-
nodes[r];i&&(n&&i.type===n||i.type==="open"||i.type==="close")&&i.escaped!==!0&&(i.value="\\"+i.value,i.escaped=!0)},t.encloseBrace=e=>e.type!=="brace"
|
|
247
|
-
(n.type="text"),r),[]),t.flatten=(...e)=>{const r=[],n=i=>{for(let s=0;s<i.length;s++){const o=i[s];if(Array.isArray(o)){n(o);continue}o!==void 0&&r.push(o)}return r};return n(e),r}}(Ps)),Ps}var Ts,Wu;function Ls(){if(Wu)return Ts;Wu=1;const t=Ns();return Ts=(e,r={})=>{const n=(i,s={})=>{const o=r.escapeInvalid&&t.isInvalidBrace(s),a=i.invalid===!0&&r.escapeInvalid===!0;let u="";if(i.value)return(o||a)&&t.isOpenOrClose(i)?"\\"+i.value:i.value;if(i.value)return i.value;if(i.nodes)for(const l of i.
|
|
246
|
+
nodes[r];i&&(n&&i.type===n||i.type==="open"||i.type==="close")&&i.escaped!==!0&&(i.value="\\"+i.value,i.escaped=!0)},t.encloseBrace=e=>e.type!=="brace"?!1:e.commas>>0+e.ranges>>0===0?(e.invalid=!0,!0):!1,t.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:e.commas>>0+e.ranges>>0===0||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1,t.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0,t.reduce=e=>e.reduce((r,n)=>(n.type==="text"&&r.push(n.value),n.type===
|
|
247
|
+
"range"&&(n.type="text"),r),[]),t.flatten=(...e)=>{const r=[],n=i=>{for(let s=0;s<i.length;s++){const o=i[s];if(Array.isArray(o)){n(o);continue}o!==void 0&&r.push(o)}return r};return n(e),r}}(Ps)),Ps}var Ts,Wu;function Ls(){if(Wu)return Ts;Wu=1;const t=Ns();return Ts=(e,r={})=>{const n=(i,s={})=>{const o=r.escapeInvalid&&t.isInvalidBrace(s),a=i.invalid===!0&&r.escapeInvalid===!0;let u="";if(i.value)return(o||a)&&t.isOpenOrClose(i)?"\\"+i.value:i.value;if(i.value)return i.value;if(i.nodes)for(const l of i.
|
|
248
248
|
nodes)u+=n(l);return u};return n(e)},Ts}var js,Ku;function h0(){return Ku||(Ku=1,js=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}),js}var ks,Yu;function p0(){if(Yu)return ks;Yu=1;const t=h0(),e=(f,g,p)=>{if(t(f)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(g===void 0||f===g)return String(f);if(t(g)===!1)throw new TypeError("toRegexRange: expected the second argument t\
|
|
249
249
|
o be a number.");let m={relaxZeros:!0,...p};typeof m.strictZeros=="boolean"&&(m.relaxZeros=m.strictZeros===!1);let D=String(m.relaxZeros),v=String(m.shorthand),_=String(m.capture),b=String(m.wrap),I=f+":"+g+"="+D+v+_+b;if(e.cache.hasOwnProperty(I))return e.cache[I].result;let U=Math.min(f,g),G=Math.max(f,g);if(Math.abs(U-G)===1){let M=f+"|"+g;return m.capture?`(${M})`:m.wrap===!1?M:`(?:${M})`}let L=$(f)||$(g),B={min:f,max:g,a:U,b:G},N=[],j=[];if(L&&(B.isPadded=L,B.maxLen=String(B.max).length),U<
|
|
250
250
|
0){let M=G<0?Math.abs(G):1;j=s(M,Math.abs(U),B,m),U=B.a=0}return G>=0&&(N=s(U,G,B,m)),B.negatives=j,B.positives=N,B.result=r(j,N),m.capture===!0?B.result=`(${B.result})`:m.wrap!==!1&&N.length+j.length>1&&(B.result=`(?:${B.result})`),e.cache[I]=B,B.result};function r(f,g,p){let m=o(f,g,"-",!1)||[],D=o(g,f,"",!1)||[],v=o(f,g,"-?",!0)||[];return m.concat(v).concat(D).join("|")}function n(f,g){let p=1,m=1,D=c(f,p),v=new Set([g]);for(;f<=D&&D<=g;)v.add(D),p+=1,D=c(f,p);for(D=d(g+1,m)-1;f<D&&D<=g;)v.add(
|
package/dist/index.d.mts
CHANGED
|
@@ -15857,7 +15857,7 @@ declare class LikeC4DocumentSymbolProvider implements DocumentSymbolProvider {
|
|
|
15857
15857
|
protected readonly parser: LikeC4ModelParser;
|
|
15858
15858
|
protected readonly locator: LikeC4ModelLocator;
|
|
15859
15859
|
constructor(services: LikeC4Services);
|
|
15860
|
-
getSymbols(
|
|
15860
|
+
getSymbols(doc: LangiumDocument, _params: DocumentSymbolParams, cancelToken?: CancellationToken): Promise<DocumentSymbol[]>;
|
|
15861
15861
|
protected getLikec4LibSymbol(astLib: LikeC4Lib): DocumentSymbol[];
|
|
15862
15862
|
protected getSpecSymbol(astSpec: SpecificationRule): DocumentSymbol[];
|
|
15863
15863
|
protected getModelSymbol(astModel: Model): DocumentSymbol[];
|
|
@@ -15889,17 +15889,22 @@ declare class LikeC4SemanticTokenProvider extends AbstractSemanticTokenProvider
|
|
|
15889
15889
|
private highlightView;
|
|
15890
15890
|
}
|
|
15891
15891
|
|
|
15892
|
-
|
|
15893
|
-
|
|
15894
|
-
|
|
15892
|
+
declare namespace ChangeView {
|
|
15893
|
+
type Params = {
|
|
15894
|
+
viewId: ViewId;
|
|
15895
|
+
change: ViewChange;
|
|
15896
|
+
};
|
|
15897
|
+
type Res = Location | null;
|
|
15898
|
+
const Req: RequestType<Params, Res, void>;
|
|
15899
|
+
type Req = typeof Req;
|
|
15895
15900
|
}
|
|
15896
15901
|
|
|
15897
15902
|
declare class LikeC4ModelChanges {
|
|
15898
15903
|
private services;
|
|
15899
15904
|
private locator;
|
|
15900
15905
|
constructor(services: LikeC4Services);
|
|
15901
|
-
applyChange(changeView:
|
|
15902
|
-
protected convertToTextEdit({ viewId, change }:
|
|
15906
|
+
applyChange(changeView: ChangeView.Params): Promise<Location | null>;
|
|
15907
|
+
protected convertToTextEdit({ viewId, change }: ChangeView.Params): {
|
|
15903
15908
|
doc: ParsedLikeC4LangiumDocument;
|
|
15904
15909
|
modifiedRange: Range$1;
|
|
15905
15910
|
edits: TextEdit$1[];
|
package/dist/index.d.ts
CHANGED
|
@@ -15857,7 +15857,7 @@ declare class LikeC4DocumentSymbolProvider implements DocumentSymbolProvider {
|
|
|
15857
15857
|
protected readonly parser: LikeC4ModelParser;
|
|
15858
15858
|
protected readonly locator: LikeC4ModelLocator;
|
|
15859
15859
|
constructor(services: LikeC4Services);
|
|
15860
|
-
getSymbols(
|
|
15860
|
+
getSymbols(doc: LangiumDocument, _params: DocumentSymbolParams, cancelToken?: CancellationToken): Promise<DocumentSymbol[]>;
|
|
15861
15861
|
protected getLikec4LibSymbol(astLib: LikeC4Lib): DocumentSymbol[];
|
|
15862
15862
|
protected getSpecSymbol(astSpec: SpecificationRule): DocumentSymbol[];
|
|
15863
15863
|
protected getModelSymbol(astModel: Model): DocumentSymbol[];
|
|
@@ -15889,17 +15889,22 @@ declare class LikeC4SemanticTokenProvider extends AbstractSemanticTokenProvider
|
|
|
15889
15889
|
private highlightView;
|
|
15890
15890
|
}
|
|
15891
15891
|
|
|
15892
|
-
|
|
15893
|
-
|
|
15894
|
-
|
|
15892
|
+
declare namespace ChangeView {
|
|
15893
|
+
type Params = {
|
|
15894
|
+
viewId: ViewId;
|
|
15895
|
+
change: ViewChange;
|
|
15896
|
+
};
|
|
15897
|
+
type Res = Location | null;
|
|
15898
|
+
const Req: RequestType<Params, Res, void>;
|
|
15899
|
+
type Req = typeof Req;
|
|
15895
15900
|
}
|
|
15896
15901
|
|
|
15897
15902
|
declare class LikeC4ModelChanges {
|
|
15898
15903
|
private services;
|
|
15899
15904
|
private locator;
|
|
15900
15905
|
constructor(services: LikeC4Services);
|
|
15901
|
-
applyChange(changeView:
|
|
15902
|
-
protected convertToTextEdit({ viewId, change }:
|
|
15906
|
+
applyChange(changeView: ChangeView.Params): Promise<Location | null>;
|
|
15907
|
+
protected convertToTextEdit({ viewId, change }: ChangeView.Params): {
|
|
15903
15908
|
doc: ParsedLikeC4LangiumDocument;
|
|
15904
15909
|
modifiedRange: Range$1;
|
|
15905
15910
|
edits: TextEdit$1[];
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"@likec4/core";export{LikeC4DeploymentModel,LikeC4Model,LikeC4ViewModel}from"@likec4/core/model";export{L as LikeC4}from"./shared/likec4.
|
|
1
|
+
import"@likec4/core";export{LikeC4DeploymentModel,LikeC4Model,LikeC4ViewModel}from"@likec4/core/model";export{L as LikeC4}from"./shared/likec4.DX7xzn9M.mjs";import"node:fs";import"node:path";import"node:url";import"tty";import"node:util";import"util";import"path";import"os";import"crypto";import"net";import"url";import"fs";import"child_process";import"@likec4/core/types";import"events";import"buffer";import"@hpcc-js/wasm-graphviz";import"@likec4/core/compute-view";import"@likec4/core/utils";import"node:process";
|
|
2
2
|
import"boxen";import"node:child_process";import"node:events";import"node:fs/promises";import"node:stream/promises";import"node:os";import"fs/promises";
|