@likec4/core 1.56.0 → 1.57.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/dist/_chunks/Builder.view-element.mjs +2 -2
- package/dist/_chunks/LikeC4Model.d.mts +1 -1
- package/dist/_chunks/_types.d.mts +7 -3
- package/dist/_chunks/_types2.d.mts +1 -1
- package/dist/_chunks/assignTagColors.mjs +1 -1
- package/dist/_chunks/index.d.mts +64 -2
- package/dist/_chunks/index3.d.mts +1 -1
- package/dist/_chunks/index4.d.mts +1 -1
- package/dist/_chunks/index5.d.mts +9 -2
- package/dist/_chunks/libs/chroma-js.mjs +2 -2
- package/dist/_chunks/libs/graphology-dag.mjs +1 -1
- package/dist/_chunks/libs/mdast-util-find-and-replace.mjs +1 -1
- package/dist/_chunks/libs/mnemonist.d.mts +33 -33
- package/dist/_chunks/libs/mnemonist.mjs +1 -1
- package/dist/_chunks/manual-layout.mjs +1 -1
- package/dist/_chunks/model.mjs +4 -4
- package/dist/_chunks/types.mjs +1 -1
- package/dist/builder/index.d.mts +2 -2
- package/dist/builder/index.mjs +1 -1
- package/dist/compute-view/index.d.mts +2 -2
- package/dist/compute-view/index.mjs +2 -2
- package/dist/geometry/index.mjs +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +1 -1
- package/dist/styles/index.d.mts +1 -1
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.mjs +1 -1
- package/dist/utils/index.d.mts +3 -3
- package/dist/utils/index.mjs +1 -1
- package/package.json +9 -9
package/dist/_chunks/types.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,r as t}from"./rolldown-runtime.mjs";import{t as n}from"./libs/defu.mjs";import{B as r,F as i,I as a,M as o,N as s,O as c,P as ee,Q as l,R as u,T as te,V as d,a as ne,et as re,f as ie,it as ae,k as f,l as oe,rt as se,t as ce,x as le}from"./libs/remeda.mjs";import{i as ue,n as de,s as fe,t as pe}from"./libs/mnemonist.mjs";import{t as me}from"./libs/natural-compare-lite.mjs";import{t as he}from"./libs/ohash.mjs";import{n as ge}from"./libs/hast-util-sanitize.mjs";import{t as _e}from"./libs/rehype-sanitize.mjs";import{t as ve}from"./libs/rehype-stringify.mjs";import{l as ye,t as be}from"./libs/mdast-util-from-markdown.mjs";import{t as xe}from"./libs/remark-gfm.mjs";import{t as Se}from"./libs/remark-github-blockquote-alert.mjs";import{t as Ce}from"./libs/remark-parse.mjs";import{t as we}from"./libs/remark-rehype.mjs";import{t as Te}from"./libs/unified.mjs";import{a as Ee,c as De,d as Oe,f as ke,h as Ae,i as je,l as Me,m as Ne,n as Pe,o as Fe,p as Ie,r as Le,s as Re,t as ze,u as Be}from"./libs/@radix-ui/colors.mjs";import{t as p}from"./libs/chroma-js.mjs";function Ve(e){return le(e,e=>e===void 0)}function He(e){return e.summary??e.description}function Ue(e){return e.description??e.summary}function We(e){return Array.isArray(e)&&e.length===2&&typeof e[0]==`number`&&typeof e[1]==`number`}function Ge(e){return We(e)?{x:e[0],y:e[1]}:[e.x,e.y]}function Ke(e,t){if(e===void 0||e==null){let n=typeof t==`function`?t():t;throw Error(n??`Expected defined value, but received ${e}`)}return e}function m(e,t){if(!e)throw Error(t??`Invariant failed`)}function h(e){throw Error(`NonExhaustive value: ${e}`)}const qe={center({x:e,y:t,width:n,height:r}){return{x:e+n/2,y:t+r/2}},toPoints({x:e,y:t,width:n,height:r}){return[{x:e,y:t},{x:e+n,y:t},{x:e+n,y:t+r},{x:e,y:t+r}]},fromPoints(e){let{x1:t,y1:n,x2:r,y2:i}=g.fromPoints(e);return{x:t,y:n,width:r-t,height:i-n}},merge(...e){if(m(l(e,1),`No boxes provided`),e.length===1)return e[0];let t=e[0].x,n=e[0].y,r=e[0].x+e[0].width,i=e[0].y+e[0].height;for(let a=1;a<e.length;a++){let o=e[a];t=Math.min(t,o.x),n=Math.min(n,o.y),r=Math.max(r,o.x+o.width),i=Math.max(i,o.y+o.height)}return{x:Math.floor(t),y:Math.floor(n),width:Math.round(r-t),height:Math.round(i-n)}},fromRectBox(e){return{x:Math.min(e.x1,e.x2),y:Math.min(e.y1,e.y2),width:Math.abs(e.x2-e.x1),height:Math.abs(e.y2-e.y1)}},toRectBox(e){return{x1:e.x,y1:e.y,x2:e.x+e.width,y2:e.y+e.height}},expand(e,t){return t===0?e:{x:e.x-t,y:e.y-t,width:e.width+t*2,height:e.height+t*2}},shrink(e,t){return t===0?e:{x:e.x+t,y:e.y+t,width:e.width-t*2,height:e.height-t*2}},includes(e,t){return e===t?!0:e.x<=t.x&&e.y<=t.y&&e.x+e.width>=t.x+t.width&&e.y+e.height>=t.y+t.height}},g={center({x1:e,y1:t,x2:n,y2:r}){return{x:(e+n)/2,y:(t+r)/2}},fromPoints(e){m(e.length>0,`At least one point is required`);let t=1/0,n=1/0,r=-1/0,i=-1/0;for(let[a,o]of e)t=Math.min(t,a),n=Math.min(n,o),r=Math.max(r,a),i=Math.max(i,o);return{x1:t,y1:n,x2:r,y2:i}},merge(...e){m(e.length>0,`No boxes provided`);let t=1/0,n=1/0,r=-1/0,i=-1/0;for(let a of e)t=Math.min(t,a.x1),n=Math.min(n,a.y1),r=Math.max(r,a.x2),i=Math.max(i,a.y2);return{x1:t,y1:n,x2:r,y2:i}},toBBox(e){return{x:e.x1,y:e.y1,width:e.x2-e.x1,height:e.y2-e.y1}},includes(e,t){return e===t?!0:e.x1<=t.x1&&e.y1<=t.y1&&e.x2>=t.x2&&e.y2>=t.y2}};function Je(e,t,n){return e.length===0||t.length===0?[]:(n??=Object.is,re(ce(e,t),ne(([e,t])=>n(e,t)),te(([e,t])=>e)))}var _=t(me(),1);function v(e,t){return e===t?0:f(e)?f(t)?(0,_.default)(e,t):1:f(t)?-1:0}function y(e){return oe(e,v)}function Ye(...e){return e.length===0?y:y(e[0])}function Xe(e=`.`,t=!1){return(n,r)=>{if(n===r)return 0;if(!n)return-1;if(!r)return 1;let i=n.split(e),a=r.split(e),o=Math.min(i.length,a.length);for(let e=0;e<o;e++){let t=i[e],n=a[e],r=(0,_.default)(t,n);if(r!==0)return r}let s=i.length-a.length;return t?-1*s:s}}function Ze(e){let t=e.lastIndexOf(`.`);return t>0?e.slice(0,t):null}function Qe(e){let t=e.lastIndexOf(`.`);return t>0?e.slice(t+1):e}const b=e=>E(e)?e:e.id;function x(e,t){let n=b(e);return t?b(t).startsWith(n+`.`):e=>{let t=b(e);return n.startsWith(t+`.`)}}function S(e,t){if(!t)return t=>S(e,t);let n=b(e),r=b(t);return n===r||r.startsWith(n+`.`)||n.startsWith(r+`.`)}function $e(e,t){return t?x(t,e):t=>x(e,t)}function C(e){return(E(e)?e:e.id).split(`.`).length}function et(e,t){let n=E(e)?e:e.id,r=E(t)?t:t.id;if(n===r)return 0;let i=C(n),a=C(r);if(S(n,r))return Math.abs(i-a);let o=w(n,r),s=o?C(o):0;return i+a-(2*s+1)}function w(e,t){let n=e.split(`.`);if(n.length<2)return null;let r=t.split(`.`);if(r.length<2)return null;let i=[];for(let e=0;e<Math.min(n.length,r.length)-1&&n[e]===r[e];e++)i.push(n[e]);return i.length===0?null:i.join(`.`)}function tt(e){let t=e.split(`.`);if(t.pop(),!l(t,2))return t;for(let e=1;e<t.length;e++)t[e]=t[e-1]+`.`+t[e];return t.reverse()}function T(e,t){let n=e.split(`.`).length,r=t.split(`.`).length;switch(!0){case n>r:return 1;case n<r:return-1;default:return 0}}function nt(e,t){return T(e.id,t.id)}function rt(e){return e.map(e=>({item:e,fqn:e.id.split(`.`)})).sort((e,t)=>e.fqn.length-t.fqn.length).map(({item:e})=>e)}function it(e,t){let n=t;for(let t of e)t!==n&&x(t,n)&&(n=t);return n===t?null:n}function at(e){let t=[],n=[...e],r;for(;r=n.shift();){let e;for(;e=it(n,r);)t.push(...n.splice(n.indexOf(e),1));t.push(r)}return t}function ot(e,t){if(!e||E(e)){let t=e??`asc`;return e=>ot(e,t)}let n=t===`desc`?-1:1;return e.map(e=>({item:e,fqn:e.id.split(`.`)})).sort((e,t)=>{if(e.fqn.length!==t.fqn.length)return(e.fqn.length-t.fqn.length)*n;for(let n=0;n<e.fqn.length;n++){let r=v(e.fqn[n],t.fqn[n]);if(r!==0)return r}return 0}).map(({item:e})=>e)}function st(e,t,n){let r=e.get(t);return r||(r=n(t),e.set(t,r)),r}function E(e){return e!=null&&typeof e==`string`}function ct(e){return!!e&&Array.isArray(e)&&e.length>0}function lt(e,t){return m(typeof t==`string`,`Path must be string`),typeof e==`object`&&!!e&&e[t]!=null}function ut(e){return t=>lt(t,e)}function dt(...e){if(e.length===1&&typeof e[0]==`string`)return ut(e[0]);let[t,n]=e;return lt(t,n)}function ft(...e){return(t=>e.some(e=>e(t)))}function pt(e){return typeof e==`object`&&!!e&&Symbol.iterator in e}function mt(e,t){let n=t??e;m(i(n));function*r(e){for(let t of e)n(t)&&(yield t)}return t?r(e):r}function ht(e,t){let n=t??e;m(i(n));function r(e){for(let t of e)if(n(t))return t}return t?r(e):r}function gt(e,t){let n=t??e;m(typeof n==`number`&&n>=0,`Count must be a non-negative number`);function*r(e){let t=0;for(let r of e){if(t>=n)break;yield r,t++}}return t===void 0?e=>r(e):r(e)}function _t(e){return e?vt(e):vt}function*vt(e){for(let t of e)yield*t}function yt(e,t){let n=t??e;m(i(n));function*r(e){for(let t of e)yield*n(t)}return t?r(e):r}function bt(e){return e?xt(e):xt}function xt(e){let{value:t}=e[Symbol.iterator]().next();return t}function St(e,t){let n=t??e;m(i(n));function*r(e){for(let t of e)yield n(t)}return t?r(e):r}function Ct(e,t,n){let r=u(n)?t:e,a=n??t;m(i(r));function o(e){let t=a;for(let n of e)t=r(t,n);return t}return u(n)?o(e):o}function wt(e,t){let n=t??e;m(i(n));function r(e){for(let t of e)if(n(t))return!0;return!1}return t?r(e):r}function Tt(e){return e?Array.from(e):e=>Array.from(e)}function Et(e){return e?new Set(e):e=>new Set(e)}function Dt(e){return e?Ot(e):Ot}function*Ot(e){let t=new Set;for(let n of e)t.has(n)||(t.add(n),yield n)}function D(e,t,n){let r=typeof t==`symbol`?t:Symbol.for(t);return e.hasOwnProperty(r)||Object.defineProperty(e,r,{enumerable:!1,writable:!1,value:n()}),e[r]}function kt(...e){let t=100;return e.length===2?t=ie(e[0],e[1]):e.length===1&&(t=e[0]),new Promise(e=>{setTimeout(()=>{e(`LIKEC4_DELAY`)},t??100)})}function At(){return Promise.resolve().then(()=>void 0)}function jt(e){Promise.resolve().then(e)}const Mt=(e,t)=>{let n=w(e.source.id,e.target.id),r=w(t.source.id,t.target.id);if(n&&!r)return 1;if(!n&&r)return-1;let i=n&&r?T(n,r):0;if(i!==0)return i;let a=T(e.source.id,t.source.id);return a===0?T(e.target.id,t.target.id):a};function Nt(...e){let t=new Set;for(let n of e)for(let e of n)t.add(e);return t}function Pt(e,...t){let n=new Set;if(e.size===0)return n;let r=l(t,2)?(0,fe.intersection)(...t):t[0];if(r.size===0)return n;for(let t of e)r.has(t)&&n.add(t);return n}function Ft(e,t){if(e.size===0)return new Set;if(t.size===0)return new Set(e);let n=new Set;for(let r of e)t.has(r)||n.add(r);return n}function It(e,t){return e.size===t.size&&[...e].every(e=>t.has(e))}function Lt(e,t){return(0,fe.symmetricDifference)(e,t)}function Rt(e,t){if(e.size===0||t.size===0)return!1;t.size<e.size&&([e,t]=[t,e]);for(let n of e)if(t.has(n))return!0;return!1}function O(e){return m(typeof e==`object`&&ee(e),`objectHash: value must be an object`),he(e)}function zt(e){let t=5381,n=e.length;m(n>0,`stringHash: empty string`);for(let r=0;r<n;r++)t=t*33^e.charCodeAt(r);return(t>>>0).toString(36)}function Bt(){return Te().use(Ce).use(xe).use(Se).use(we,{allowDangerousHtml:!0}).use(_e,n({attributes:{"*":[`className`],svg:[`width`,`height`,`viewBox`,`fill`,`ariaHidden`],path:[`d`,`fill`,`stroke`,`strokeWidth`,`strokeLinecap`,`strokeLinejoin`]},tagNames:[`svg`,`g`,`path`,`div`],protocols:{src:[`data`]}},ge)).use(ve,{allowDangerousHtml:!0})}function k(e){return(``+Bt().processSync(e)).trim()}function A(e){return ye(be(e),{includeHtml:!1,includeImageAlt:!1})}var j=class e{constructor(e,t){this.x=e,this.y=t,m(typeof e==`number`&&!isNaN(e)&&isFinite(e)&&typeof t==`number`&&!isNaN(t)&&isFinite(t),`Invalid arguments for Vector: (${e}, ${t})`)}static create(...t){return t.length===2?new e(t[0],t[1]):new e(t[0].x,t[0].y)}static add(e,t){return{x:e.x+t.x,y:e.y+t.y}}static subtract(e,t){return{x:e.x-t.x,y:e.y-t.y}}static multiply(e,t){return{x:e.x*t,y:e.y*t}}static divide(e,t){return{x:e.x/t,y:e.y/t}}static dot(e,t){return e.x*t.x+e.y*t.y}add(t){return new e(this.x+t.x,this.y+t.y)}subtract(t){return new e(this.x-t.x,this.y-t.y)}multiply(t){return new e(this.x*t,this.y*t)}divide(t){return new e(this.x/t,this.y/t)}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}length(){return this.x===0&&this.y===0?0:Math.sqrt(this.x**2+this.y**2)}normalize(){let t=this.length();return t===0?new e(0,0):new e(this.x/t,this.y/t)}round(){return new e(Math.round(this.x),Math.round(this.y))}trunc(){return new e(Math.trunc(this.x),Math.trunc(this.y))}toObject(){return{x:this.x,y:this.y}}};function Vt(...e){return e.length===1&&e[0]instanceof j?e[0]:e.length===2?new j(e[0],e[1]):new j(e[0].x,e[0].y)}function Ht(e,t){return e[M]===t}const M=`_stage`,Ut=`_type`,Wt=`_layout`;var Gt=e({DeploymentFqn:()=>B,EdgeId:()=>Yt,Fqn:()=>L,GlobalFqn:()=>U,GroupElementKind:()=>R,MarkdownOrString:()=>P,NodeId:()=>Jt,NoneIcon:()=>I,ProjectId:()=>N,RelationId:()=>H,StepEdgeKind:()=>Zt,ViewId:()=>V,extractStep:()=>Qt,flattenMarkdownOrString:()=>F,isGlobalFqn:()=>Kt,isGroupElementKind:()=>z,isStepEdgeId:()=>W,splitGlobalFqn:()=>qt,stepEdgeId:()=>Xt});function N(e){return e}function P(e){return typeof e==`string`?{txt:e}:e}function F(e){if(a(e))return null;let t=f(e)?e:e.txt??e.md;return c(t?.trim())?t:null}const I=`none`;function L(e,t){return t?t+`.`+e:e}const R=`@group`;function z(e){return e.kind===R}function B(e,t){return t?t+`.`+e:e}function V(e){return e}function H(e){return e}function U(e,t){return m(typeof e==`string`&&e!=``),`@`+e+`.`+t}function Kt(e){return e.startsWith(`@`)}function qt(e){if(!e.startsWith(`@`))return[null,e];let t=e.indexOf(`.`);if(t<2)throw Error(`Invalid global FQN`);return[e.slice(1,t),e.slice(t+1)]}function Jt(e){return e}function Yt(e){return e}function Xt(e,t){let n=`step-${String(e).padStart(2,`0`)}`;return t?`${n}.${t}`:n}const Zt=`@step`;function W(e){return e.startsWith(`step-`)}function Qt(e){if(!W(e))throw Error(`Invalid step edge id: ${e}`);return parseFloat(e.slice(5))}let G;(function(e){function t(e){return`model`in e&&!(`project`in e)}e.isElementRef=t;function n(e){return`project`in e&&`model`in e}e.isImportRef=n;function r(e){if(f(e))throw Error(`Expected FqnRef, got: "${e}"`);if(n(e))return U(e.project,e.model);if(t(e))return e.model;throw Error(`Expected FqnRef.ModelRef or FqnRef.ImportRef`)}e.flatten=r;function i(e){return t(e)||n(e)}e.isModelRef=i;function a(e){return`deployment`in e&&`element`in e}e.isInsideInstanceRef=a;function o(e){return`deployment`in e&&!(`element`in e)}e.isDeploymentElementRef=o;function s(e){return o(e)||a(e)}e.isDeploymentRef=s})(G||={});let K;(function(e){function t(e){return`wildcard`in e&&e.wildcard===!0}e.isWildcard=t;function n(e){return`ref`in e&&G.isModelRef(e.ref)}e.isModelRef=n;function r(e){return`ref`in e&&G.isDeploymentRef(e.ref)}e.isDeploymentRef=r;function i(e){return`elementKind`in e&&`isEqual`in e}e.isElementKindExpr=i;function a(e){return`elementTag`in e&&`isEqual`in e}e.isElementTagExpr=a;function o(e){return`where`in e&&c(e.where.expr)}e.isWhere=o;function s(e){return`custom`in e&&(c(e.custom.expr)||o(e.custom.expr))}e.isCustom=s;function c(e){return t(e)||n(e)||r(e)||i(e)||a(e)}e.is=c;function ee(e){return s(e)&&(e=e.custom.expr),o(e)&&(e=e.where.expr),e}e.unwrap=ee})(K||={});let q;(function(e){function t(e){return`source`in e&&`target`in e}e.isDirect=t;function n(e){return`incoming`in e}e.isIncoming=n;function r(e){return`outgoing`in e}e.isOutgoing=r;function i(e){return`inout`in e}e.isInOut=i;function a(e){return`where`in e&&(t(e.where.expr)||n(e.where.expr)||r(e.where.expr)||i(e.where.expr))}e.isWhere=a;function o(e){return`customRelation`in e}e.isCustom=o;function s(e){return t(e)||n(e)||r(e)||i(e)}e.is=s;function c(e){return o(e)&&(e=e.customRelation.expr),a(e)&&(e=e.where.expr),e}e.unwrap=c})(q||={});let $t;(function(e){function t(e){return`where`in e}e.isWhere=t;function n(e){return q.isWhere(e)}e.isRelationWhere=n;function r(e){return K.isWhere(e)}e.isFqnExprWhere=r;function i(e){return K.is(e)||K.isWhere(e)||K.isCustom(e)}e.isFqnExpr=i;function a(e){return q.is(e)||q.isWhere(e)||q.isCustom(e)}e.isRelation=a})($t||={});let J;(function(e){function t(e){return`wildcard`in e&&e.wildcard===!0}e.isWildcard=t;function n(e){return`ref`in e&&G.isModelRef(e.ref)}e.isModelRef=n;function r(e){return`elementKind`in e&&`isEqual`in e}e.isElementKindExpr=r;function i(e){return`elementTag`in e&&`isEqual`in e}e.isElementTagExpr=i;function a(e){return`where`in e&&s(e.where.expr)}e.isWhere=a;function o(e){return`custom`in e&&(s(e.custom.expr)||a(e.custom.expr))}e.isCustom=o;function s(e){return t(e)||n(e)||r(e)||i(e)}e.is=s;function c(e){return o(e)&&(e=e.custom.expr),a(e)&&(e=e.where.expr),e}e.unwrap=c})(J||={});let Y;(function(e){function t(e){return`source`in e&&`target`in e}e.isDirect=t;function n(e){return`incoming`in e}e.isIncoming=n;function r(e){return`outgoing`in e}e.isOutgoing=r;function i(e){return`inout`in e}e.isInOut=i;function a(e){return`where`in e&&(t(e.where.expr)||n(e.where.expr)||r(e.where.expr)||i(e.where.expr))}e.isWhere=a;function o(e){return`customRelation`in e}e.isCustom=o;function s(e){return t(e)||n(e)||r(e)||i(e)}e.is=s;function c(e){return o(e)&&(e=e.customRelation.expr),a(e)&&(e=e.where.expr),e}e.unwrap=c})(Y||={});let en;(function(e){function t(e){return`where`in e}e.isWhere=t;function n(e){return Y.isWhere(e)}e.isRelationWhere=n;function r(e){return J.isWhere(e)}e.isFqnExprWhere=r;function i(e){return J.is(e)||J.isWhere(e)||J.isCustom(e)}e.isFqnExpr=i;function a(e){return Y.is(e)||Y.isWhere(e)||Y.isCustom(e)}e.isRelationExpr=a})(en||={});function tn(e){return c(e.kind)&&!c(e.element)}function nn(e){return c(e.element)&&!c(e.kind)}const rn={fill:`#3b82f6`,stroke:`#2563eb`,hiContrast:`#eff6ff`,loContrast:`#bfdbfe`},an={fill:`#0284c7`,stroke:`#0369a1`,hiContrast:`#f0f9ff`,loContrast:`#B6ECF7`},on={fill:`#64748b`,stroke:`#475569`,hiContrast:`#f8fafc`,loContrast:`#cbd5e1`},sn={primary:rn,blue:rn,secondary:an,sky:an,muted:on,slate:on,gray:{fill:`#737373`,stroke:`#525252`,hiContrast:`#fafafa`,loContrast:`#d4d4d4`},red:{fill:`#AC4D39`,stroke:`#853A2D`,hiContrast:`#FBD3CB`,loContrast:`#f5b2a3`},green:{fill:`#428a4f`,stroke:`#2d5d39`,hiContrast:`#f8fafc`,loContrast:`#c2f0c2`},amber:{fill:`#A35829`,stroke:`#7E451D`,hiContrast:`#FFE0C2`,loContrast:`#f9b27c`},indigo:{fill:`#6366f1`,stroke:`#4f46e5`,hiContrast:`#eef2ff`,loContrast:`#c7d2fe`}},cn={line:`#8D8D8D`,labelBg:`#18191B`,label:`#C9C9C9`},ln={line:`#64748b`,labelBg:`#0f172a`,label:`#cbd5e1`},un={line:`#3b82f6`,labelBg:`#172554`,label:`#eff5fd`},dn={line:`#0ea5e9`,labelBg:`#082f49`,label:`#d4f2ff`},fn={amber:{line:`#b45309`,labelBg:`#78350f`,label:`#FFE0C2`},blue:un,gray:cn,green:{line:`#15803d`,labelBg:`#052e16`,label:`#bbfcd3`},indigo:{line:`#6366f1`,labelBg:`#1e1b4b`,label:`#cbd0fd`},muted:ln,primary:un,red:{line:`#AC4D39`,labelBg:`#b91c1c`,label:`#fcd9d2`},secondary:dn,sky:dn,slate:ln},pn={sizes:{xs:{width:180,height:100},sm:{width:240,height:135},md:{width:320,height:180},lg:{width:420,height:234},xl:{width:520,height:290}},spacing:{xs:8,sm:10,md:16,lg:24,xl:32},textSizes:{xs:13.33,sm:16,md:19.2,lg:23.04,xl:27.65},iconSizes:{xs:24,sm:36,md:60,lg:82,xl:90}},mn=[`xs`,`sm`,`md`,`lg`,`xl`],hn=[`left`,`right`,`top`,`bottom`],gn=[`solid`,`dashed`,`dotted`,`none`],_n=[`rectangle`,`person`,`browser`,`mobile`,`cylinder`,`storage`,`queue`,`bucket`,`document`,`component`],vn=[`amber`,`blue`,`gray`,`slate`,`green`,`indigo`,`muted`,`primary`,`red`,`secondary`,`sky`],yn=[`tomato`,`grass`,`blue`,`ruby`,`orange`,`indigo`,`pink`,`teal`,`purple`,`amber`,`crimson`,`red`,`lime`,`yellow`,`violet`],bn={tomato:Ie.tomato9,grass:je.grass9,blue:Pe.blue9,ruby:Oe.ruby9,orange:Re.orange9,indigo:Ee.indigo9,pink:De.pink9,teal:ke.teal9,purple:Me.purple9,amber:ze.amber9,crimson:Le.crimson9,red:Be.red9,lime:Fe.lime9,yellow:Ae.yellow9,violet:Ne.violet9};function xn(e){return e in bn}const Sn={colors:vn.reduce((e,t)=>(e[t]={elements:sn[t],relationships:fn[t]},e),{}),...pn};function Cn(e,t){return t=Math.max(-1,Math.min(1,t)),e.map(e=>{let n=t>0?e+(255-e)*t:e*(1+t);return Math.round(Math.max(0,Math.min(255,n)))})}function wn(e,t){return p(Cn(p(e).rgb(),t)).hex()}function Tn(e){m(p.valid(e),`Invalid color: ${e}`);let t=e.trim(),n=En(t.startsWith(`#`)?t:p(t).hex());return{elements:{fill:n.el_main,stroke:n.el_secondary,hiContrast:n.el_hiContrast,loContrast:n.el_loContrast},relationships:{line:n.rel_secondary,label:n.rel_hiContrast,labelBg:n.rel_main}}}function En(e){let t=e,n=p(t).darken(.8).hex(),r=Dn(t),i=r.hiContrast,a=r.loContrast,o=t;return{el_main:t,el_secondary:n,el_hiContrast:i,el_loContrast:a,rel_main:o,rel_secondary:wn(t,-.25),rel_hiContrast:Dn(o).hiContrast}}function Dn(e){let t=p(e),n=t.brighten(2),r=t.darken(2),i,a,o,s;do i=n,a=r,n=n.brighten(1),r=r.darken(1),o=p.contrastAPCA(t,n),s=p.contrastAPCA(t,r);while(Math.abs(o)<60&&Math.abs(s)<60&&(!d(n,i)||!d(r,a)));return Math.abs(o)>Math.abs(s)?{hiContrast:p(n.brighten(.4)).hex(),loContrast:n.hex()}:{hiContrast:p(r.darken(.4)).hex(),loContrast:r.hex()}}function On(e,t){let n=t??6,r=p(e.fill),i=p(e.stroke),a=r.luminance()>.8,o=re(ce(p.scale(a?[r.darken(.02).desaturate(.05),r.darken(.1).desaturate(.1)]:[r.shade(.12,`lch`).desaturate(.05),r.shade(.35,`lch`).desaturate(.4)]).mode(`oklch`).correctLightness().colors(n,null),p.scale(a?[i.darken(.04).desaturate(.05),i.darken(.12).desaturate(.1)]:[i.shade(.15,`lch`).desaturate(.08),i.shade(.4,`lch`).desaturate(.4)]).mode(`oklch`).correctLightness().colors(n,null)),te(([t,n])=>({...e,fill:t.hex(),stroke:n.hex()})));return m(o.length===n,`Expected ${n} colors, got ${o.length}`),o}const kn={color:`primary`,size:`md`,opacity:15,shape:`rectangle`,group:{opacity:15,border:`dashed`},relationship:{color:`gray`,line:`dashed`,arrow:`normal`}},X=Sn,Z={theme:X,defaults:kn};var An=class e{theme;defaults;static DEFAULT=new e(Z);static from(t,r){if(!t&&!r)return this.DEFAULT;let{customCss:i,theme:o,defaults:s}={...t},c=n({theme:o},{defaults:{...s}},{theme:{colors:{...r}}},Z);return a(i?.content)&&d(c,Z)?this.DEFAULT:new e(c,i)}constructor(e,t){this.config=e,this.customCss=t,this.theme=e.theme,this.defaults=e.defaults}get fingerprint(){return D(this,`fingerprint`,()=>O({config:this.config,customCss:this.customCss}))}get elementColors(){return this.theme.colors[this.defaults.color].elements}get relationshipColors(){return this.theme.colors[this.defaults.relationship.color].relationships}get groupColors(){let e=this.defaults.group?.color;if(!e)return this.elementColors;if(!this.isThemeColor(e))throw Error(`Default group color not found in theme: ${e}`);return D(this,`defaultGroup`,()=>({...this.elementColors,...this.theme.colors[e].elements}))}isDefaultColor(e){return e===this.defaults.color}colors(e){return this.computeFrom(e??this.defaults.color)}compoundColorsCache=new de.default(e=>new pe.default(t=>On(e,t)));colorsForCompounds(e,t){return this.compoundColorsCache.get(e).get(t??6)}fontSize(e){return e??=this.defaults.text??this.defaults.size,this.theme.textSizes[e]}padding(e){return e??=this.defaults.padding??this.defaults.size,this.theme.spacing[e]}iconSize(e){return e??=this.defaults.size,this.theme.iconSizes[e]}isThemeColor(e){return e in this.theme.colors}nodeSizes(e){let t=jn(e,this.defaults.size);return{sizes:t,values:{sizes:this.theme.sizes[t.size],padding:this.padding(t.padding),textSize:this.fontSize(t.textSize),iconSize:this.iconSize(t.iconSize)}}}computeFrom(e){if(this.isThemeColor(e))return this.theme.colors[e];if(!p.valid(e))throw Error(`Invalid color value: "${e}" (not a theme color and not a valid CSS color)`);return Tn(e)}equals(e){return e===this?!0:this.constructor===e.constructor?this.fingerprint===e.fingerprint:!1}tagColor(e){return this.isThemeColor(e)?this.theme.colors[e].elements:xn(e)?this.computeFrom(bn[e]).elements:this.computeFrom(e).elements}};function jn({size:e,padding:t,textSize:n,iconSize:r,...i},a=Z.defaults.size){return e??=a,n??=e,t??=e,r??=e,{...i,size:e,padding:t,textSize:n,iconSize:r}}function Mn(e){let t=typeof e==`string`?e:e.color;return t.startsWith(`#`)||t.startsWith(`rgb`)}function Nn(e){return`tag`in e}function Pn(e){return`kind`in e}function Fn(e){return`metadata`in e}function In(e){return`participant`in e}function Ln(e){return`not`in e}function Rn(e){return`and`in e}function zn(e){return`or`in e}function Q(e){switch(!0){case In(e):{let t=e.participant;return Bn(t,Q(e.operator))}case Nn(e):{if(f(e.tag)||`eq`in e.tag){let t=f(e.tag)?e.tag:e.tag.eq;return e=>Array.isArray(e.tags)&&e.tags.includes(t)}let t=e.tag.neq;return e=>!Array.isArray(e.tags)||!e.tags.includes(t)}case Pn(e):{if(f(e.kind)||`eq`in e.kind){let t=f(e.kind)?e.kind:e.kind.eq;return e=>e.kind===t}let t=e.kind.neq;return e=>o(e.kind)||e.kind!==t}case Fn(e):{let{key:t,value:n}=e.metadata;if(n===void 0)return e=>e.metadata!=null&&t in e.metadata&&e.metadata[t]!=null;if(f(n)||`eq`in n){let e=f(n)?n:n.eq;return n=>{if(!n.metadata)return!1;let r=n.metadata[t];return Array.isArray(r)?r.includes(e):r===e}}let r=n.neq;return e=>{if(!e.metadata)return!0;let n=e.metadata[t];return n==null?!0:Array.isArray(n)?!n.includes(r):n!==r}}case Ln(e):return s(Q(e.not));case Rn(e):return ae(e.and.map(Q));case zn(e):return se(e.or.map(Q));default:h(e)}}function Bn(e,t){return n=>{if(!n.source||!n.target)return!1;switch(e){case`source`:return t(n.source);case`target`:return t(n.target)}}}function Vn(e){return`include`in e||`exclude`in e}function Hn(e){return`targets`in e&&`style`in e}function Un(e){return e._stage===`computed`}function Wn(e){return e._stage===`layouted`}function $(e){return e._type===`element`}function Gn(e){return $(e)&&c(e.viewOf)}function Kn(e){return $(e)&&c(e.extends)}function qn(e){return e._type===`deployment`}function Jn(e){return e._type===`dynamic`}function Yn(e){return`styleId`in e}function Xn(e){return`predicateId`in e}function Zn(e){return e===`TB`||e===`BT`||e===`LR`||e===`RL`}function Qn(e){return`direction`in e}function $n(e){return W(e)&&e.includes(`.`)?e.slice(0,e.indexOf(`.`)+1):null}function er(e){return!!e&&!(`__series`in e||`__parallel`in e)}function tr(e){return!!e&&`__parallel`in e&&r(e.__parallel)}function nr(e){return!!e&&`__series`in e&&r(e.__series)}function rr(e){return`title`in e&&`groupRules`in e&&Array.isArray(e.groupRules)}function ir(e){return`rank`in e&&Array.isArray(e.targets)}const ar=Symbol.for(`text`),or=Symbol.for(`html`);var sr=class e{static mdcache=new ue.default(500);static txtcache=new ue.default(500);static getOrCreateFromText(t){if(t=t.trimEnd(),t===``)return e.EMPTY;let n=e.txtcache.get(t);return n||(n=new e({txt:t}),e.txtcache.set(t,n),n)}static getOrCreateFromMarkdown(t){if(t=t.trimEnd(),t===``)return e.EMPTY;let n=e.mdcache.get(t);return n||(n=new e({md:t}),e.mdcache.set(t,n),n)}static memoize(t,n,r){return D(t,n,()=>e.from(r))}static from(t){return t==null||t===e.EMPTY?e.EMPTY:t instanceof e?t:typeof t==`string`?this.getOrCreateFromText(t):`isEmpty`in t&&t.isEmpty?e.EMPTY:`md`in t?this.getOrCreateFromMarkdown(t.md):this.getOrCreateFromText(t.txt)}static EMPTY=new class extends e{isEmpty=!0;nonEmpty=!1;isMarkdown=!1;$source=null;constructor(){super({txt:``})}get text(){return null}get md(){return null}get html(){return null}};$source;isEmpty;nonEmpty;isMarkdown;constructor(e){this.isMarkdown=!1,typeof e==`string`?(this.$source={txt:e},this.isEmpty=e.trim()===``):(this.$source=e,this.isEmpty=!0,`md`in e?(this.isEmpty=e.md===``,this.isMarkdown=!0):this.isEmpty=e.txt===``),this.nonEmpty=!this.isEmpty}get text(){if(this.isEmpty||this.$source===null)return``;let e=this.$source;return`txt`in e?e.txt:D(this,ar,()=>A(e.md))}get md(){if(this.isEmpty||this.$source===null)return``;let e=this.$source;if(`md`in e)return e.md;if(`txt`in e)return e.txt;h(e)}get html(){if(this.isEmpty||this.$source===null)return``;let e=this.$source;return`txt`in e?e.txt:D(this,or,()=>k(e.md))}equals(t){return this===t?!0:t instanceof e?this.isEmpty&&t.isEmpty?!0:this.isEmpty!==t.isEmpty||this.isMarkdown!==t.isMarkdown?!1:this.isMarkdown?this.$source?.md===t.$source?.md:this.$source?.txt===t.$source?.txt:!1}};export{U as $,E as $t,jn as A,Lt as At,vn as B,wt as Bt,Fn as C,h as Cn,k as Ct,Nn as D,He as Dn,It as Dt,In as E,Ue as En,Ft as Et,gn as F,At as Ft,Y as G,_t as Gt,tn as H,St as Ht,yn as I,D as It,q as J,mt as Jt,$t as K,gt as Kt,_n as L,Dt as Lt,X as M,Mt,kn as N,kt as Nt,Q as O,Ve as On,Rt as Ot,Tn as P,jt as Pt,L as Q,ct as Qt,hn as R,Tt as Rt,Pn as S,Ke as Sn,A as St,zn as T,We as Tn,O as Tt,en as U,bt as Ut,nn as V,Ct as Vt,J as W,yt as Wt,B as X,dt as Xt,G as Y,pt as Yt,Yt as Z,ft as Zt,Kn as _,Ye as _n,M as _t,er as a,et as an,H as at,Hn as b,g as bn,j as bt,Zn as c,$e as cn,Qt as ct,Yn as d,Ze as dn,z as dt,st as en,R as et,Un as f,rt as fn,W as ft,$ as g,Xe as gn,Wt as gt,Jn as h,v as hn,Xt as ht,$n as i,T as in,N as it,An as j,Nt as jt,Mn as k,Pt as kt,Qn as l,S as ln,F as lt,Wn as m,at as mn,qt as mt,rr as n,w as nn,Jt as nt,tr as o,C as on,Zt as ot,qn as p,ot as pn,Gt as pt,K as q,ht as qt,ir as r,nt as rn,I as rt,nr as s,x as sn,V as st,sr as t,tt as tn,P as tt,Xn as u,Qe as un,Kt as ut,Gn as v,Je as vn,Ut as vt,Ln as w,Ge as wn,zt as wt,Rn as x,m as xn,Vt as xt,Vn as y,qe as yn,Ht as yt,mn as z,Et as zt};
|
|
1
|
+
import{n as e,r as t}from"./rolldown-runtime.mjs";import{t as n}from"./libs/defu.mjs";import{B as r,F as i,I as a,M as o,N as s,O as c,P as l,Q as u,R as d,T as f,V as p,a as ee,et as m,f as te,it as ne,k as h,l as re,rt as ie,t as g,x as ae}from"./libs/remeda.mjs";import{i as _,n as oe,s as se,t as ce}from"./libs/mnemonist.mjs";import{t as le}from"./libs/natural-compare-lite.mjs";import{t as ue}from"./libs/ohash.mjs";import{n as de}from"./libs/hast-util-sanitize.mjs";import{t as fe}from"./libs/rehype-sanitize.mjs";import{t as pe}from"./libs/rehype-stringify.mjs";import{l as me,t as he}from"./libs/mdast-util-from-markdown.mjs";import{t as ge}from"./libs/remark-gfm.mjs";import{t as _e}from"./libs/remark-github-blockquote-alert.mjs";import{t as ve}from"./libs/remark-parse.mjs";import{t as ye}from"./libs/remark-rehype.mjs";import{t as be}from"./libs/unified.mjs";import{a as xe,c as Se,d as Ce,f as we,h as Te,i as Ee,l as De,m as Oe,n as ke,o as Ae,p as je,r as Me,s as Ne,t as Pe,u as Fe}from"./libs/@radix-ui/colors.mjs";import{t as v}from"./libs/chroma-js.mjs";function Ie(e){return ae(e,e=>e===void 0)}function Le(e){return e.summary??e.description}function Re(e){return e.description??e.summary}function y(e){return Array.isArray(e)&&e.length===2&&typeof e[0]==`number`&&typeof e[1]==`number`}function ze(e){return y(e)?{x:e[0],y:e[1]}:[e.x,e.y]}function Be(e,t){if(e===void 0||e==null){let n=typeof t==`function`?t():t;throw Error(n??`Expected defined value, but received ${e}`)}return e}function b(e,t){if(!e)throw Error(t??`Invariant failed`)}function x(e){throw Error(`NonExhaustive value: ${e}`)}const Ve={center({x:e,y:t,width:n,height:r}){return{x:e+n/2,y:t+r/2}},toPoints({x:e,y:t,width:n,height:r}){return[{x:e,y:t},{x:e+n,y:t},{x:e+n,y:t+r},{x:e,y:t+r}]},fromPoints(e){let{x1:t,y1:n,x2:r,y2:i}=S.fromPoints(e);return{x:t,y:n,width:r-t,height:i-n}},merge(...e){if(b(u(e,1),`No boxes provided`),e.length===1)return e[0];let t=e[0].x,n=e[0].y,r=e[0].x+e[0].width,i=e[0].y+e[0].height;for(let a=1;a<e.length;a++){let o=e[a];t=Math.min(t,o.x),n=Math.min(n,o.y),r=Math.max(r,o.x+o.width),i=Math.max(i,o.y+o.height)}return{x:Math.floor(t),y:Math.floor(n),width:Math.round(r-t),height:Math.round(i-n)}},fromRectBox(e){return{x:Math.min(e.x1,e.x2),y:Math.min(e.y1,e.y2),width:Math.abs(e.x2-e.x1),height:Math.abs(e.y2-e.y1)}},toRectBox(e){return{x1:e.x,y1:e.y,x2:e.x+e.width,y2:e.y+e.height}},expand(e,t){return t===0?e:{x:e.x-t,y:e.y-t,width:e.width+t*2,height:e.height+t*2}},shrink(e,t){return t===0?e:{x:e.x+t,y:e.y+t,width:e.width-t*2,height:e.height-t*2}},includes(e,t){return e===t?!0:e.x<=t.x&&e.y<=t.y&&e.x+e.width>=t.x+t.width&&e.y+e.height>=t.y+t.height}},S={center({x1:e,y1:t,x2:n,y2:r}){return{x:(e+n)/2,y:(t+r)/2}},fromPoints(e){b(e.length>0,`At least one point is required`);let t=1/0,n=1/0,r=-1/0,i=-1/0;for(let[a,o]of e)t=Math.min(t,a),n=Math.min(n,o),r=Math.max(r,a),i=Math.max(i,o);return{x1:t,y1:n,x2:r,y2:i}},merge(...e){b(e.length>0,`No boxes provided`);let t=1/0,n=1/0,r=-1/0,i=-1/0;for(let a of e)t=Math.min(t,a.x1),n=Math.min(n,a.y1),r=Math.max(r,a.x2),i=Math.max(i,a.y2);return{x1:t,y1:n,x2:r,y2:i}},toBBox(e){return{x:e.x1,y:e.y1,width:e.x2-e.x1,height:e.y2-e.y1}},includes(e,t){return e===t?!0:e.x1<=t.x1&&e.y1<=t.y1&&e.x2>=t.x2&&e.y2>=t.y2}};function He(e,t,n){return e.length===0||t.length===0?[]:(n??=Object.is,m(g(e,t),ee(([e,t])=>n(e,t)),f(([e,t])=>e)))}var C=t(le(),1);function w(e,t){return e===t?0:h(e)?h(t)?(0,C.default)(e,t):1:h(t)?-1:0}function T(e){return re(e,w)}function Ue(...e){return e.length===0?T:T(e[0])}function We(e=`.`,t=!1){return(n,r)=>{if(n===r)return 0;if(!n)return-1;if(!r)return 1;let i=n.split(e),a=r.split(e),o=Math.min(i.length,a.length);for(let e=0;e<o;e++){let t=i[e],n=a[e],r=(0,C.default)(t,n);if(r!==0)return r}let s=i.length-a.length;return t?-1*s:s}}function Ge(e){let t=e.lastIndexOf(`.`);return t>0?e.slice(0,t):null}function Ke(e){let t=e.lastIndexOf(`.`);return t>0?e.slice(t+1):e}const E=e=>N(e)?e:e.id;function D(e,t){let n=E(e);return t?E(t).startsWith(n+`.`):e=>{let t=E(e);return n.startsWith(t+`.`)}}function O(e,t){if(!t)return t=>O(e,t);let n=E(e),r=E(t);return n===r||r.startsWith(n+`.`)||n.startsWith(r+`.`)}function qe(e,t){return t?D(t,e):t=>D(e,t)}function k(e){return(N(e)?e:e.id).split(`.`).length}function Je(e,t){let n=N(e)?e:e.id,r=N(t)?t:t.id;if(n===r)return 0;let i=k(n),a=k(r);if(O(n,r))return Math.abs(i-a);let o=A(n,r),s=o?k(o):0;return i+a-(2*s+1)}function A(e,t){let n=e.split(`.`);if(n.length<2)return null;let r=t.split(`.`);if(r.length<2)return null;let i=[];for(let e=0;e<Math.min(n.length,r.length)-1&&n[e]===r[e];e++)i.push(n[e]);return i.length===0?null:i.join(`.`)}function Ye(e){let t=e.split(`.`);if(t.pop(),!u(t,2))return t;for(let e=1;e<t.length;e++)t[e]=t[e-1]+`.`+t[e];return t.reverse()}function j(e,t){let n=e.split(`.`).length,r=t.split(`.`).length;switch(!0){case n>r:return 1;case n<r:return-1;default:return 0}}function Xe(e,t){return j(e.id,t.id)}function Ze(e){return e.map(e=>({item:e,fqn:e.id.split(`.`)})).sort((e,t)=>e.fqn.length-t.fqn.length).map(({item:e})=>e)}function Qe(e,t){let n=t;for(let t of e)t!==n&&D(t,n)&&(n=t);return n===t?null:n}function $e(e){let t=[],n=[...e],r;for(;r=n.shift();){let e;for(;e=Qe(n,r);)t.push(...n.splice(n.indexOf(e),1));t.push(r)}return t}function M(e,t){if(!e||N(e)){let t=e??`asc`;return e=>M(e,t)}let n=t===`desc`?-1:1;return e.map(e=>({item:e,fqn:e.id.split(`.`)})).sort((e,t)=>{if(e.fqn.length!==t.fqn.length)return(e.fqn.length-t.fqn.length)*n;for(let n=0;n<e.fqn.length;n++){let r=w(e.fqn[n],t.fqn[n]);if(r!==0)return r}return 0}).map(({item:e})=>e)}function et(e,t,n){let r=e.get(t);return r||(r=n(t),e.set(t,r)),r}function N(e){return e!=null&&typeof e==`string`}function tt(e){return!!e&&Array.isArray(e)&&e.length>0}function P(e,t){return b(typeof t==`string`,`Path must be string`),typeof e==`object`&&!!e&&e[t]!=null}function nt(e){return t=>P(t,e)}function rt(...e){if(e.length===1&&typeof e[0]==`string`)return nt(e[0]);let[t,n]=e;return P(t,n)}function it(...e){return(t=>e.some(e=>e(t)))}function at(e){return typeof e==`object`&&!!e&&Symbol.iterator in e}function ot(e,t){let n=t??e;b(i(n));function*r(e){for(let t of e)n(t)&&(yield t)}return t?r(e):r}function st(e,t){let n=t??e;b(i(n));function r(e){for(let t of e)if(n(t))return t}return t?r(e):r}function ct(e,t){let n=t??e;b(typeof n==`number`&&n>=0,`Count must be a non-negative number`);function*r(e){let t=0;for(let r of e){if(t>=n)break;yield r,t++}}return t===void 0?e=>r(e):r(e)}function lt(e){return e?F(e):F}function*F(e){for(let t of e)yield*t}function ut(e,t){let n=t??e;b(i(n));function*r(e){for(let t of e)yield*n(t)}return t?r(e):r}function dt(e){return e?I(e):I}function I(e){let{value:t}=e[Symbol.iterator]().next();return t}function ft(e,t){let n=t??e;b(i(n));function*r(e){for(let t of e)yield n(t)}return t?r(e):r}function pt(e,t,n){let r=d(n)?t:e,a=n??t;b(i(r));function o(e){let t=a;for(let n of e)t=r(t,n);return t}return d(n)?o(e):o}function mt(e,t){let n=t??e;b(i(n));function r(e){for(let t of e)if(n(t))return!0;return!1}return t?r(e):r}function ht(e){return e?Array.from(e):e=>Array.from(e)}function gt(e){return e?new Set(e):e=>new Set(e)}function _t(e){return e?L(e):L}function*L(e){let t=new Set;for(let n of e)t.has(n)||(t.add(n),yield n)}function R(e,t,n){let r=typeof t==`symbol`?t:Symbol.for(t);return e.hasOwnProperty(r)||Object.defineProperty(e,r,{enumerable:!1,writable:!1,value:n()}),e[r]}function vt(...e){let t=100;return e.length===2?t=te(e[0],e[1]):e.length===1&&(t=e[0]),new Promise(e=>{setTimeout(()=>{e(`LIKEC4_DELAY`)},t??100)})}function yt(){return Promise.resolve().then(()=>void 0)}function bt(e){Promise.resolve().then(e)}const xt=(e,t)=>{let n=A(e.source.id,e.target.id),r=A(t.source.id,t.target.id);if(n&&!r)return 1;if(!n&&r)return-1;let i=n&&r?j(n,r):0;if(i!==0)return i;let a=j(e.source.id,t.source.id);return a===0?j(e.target.id,t.target.id):a},St=se.intersection,Ct=se.symmetricDifference;function wt(...e){let t=new Set;for(let n of e)for(let e of n)t.add(e);return t}function Tt(e,...t){let n=new Set;if(e.size===0)return n;let r=u(t,2)?St(...t):t[0];if(r.size===0)return n;for(let t of e)r.has(t)&&n.add(t);return n}function Et(e,t){if(e.size===0)return new Set;if(t.size===0)return new Set(e);let n=new Set;for(let r of e)t.has(r)||n.add(r);return n}function Dt(e,t){return e.size===t.size&&[...e].every(e=>t.has(e))}function Ot(e,t){return Ct(e,t)}function kt(e,t){if(e.size===0||t.size===0)return!1;t.size<e.size&&([e,t]=[t,e]);for(let n of e)if(t.has(n))return!0;return!1}function z(e){return b(typeof e==`object`&&l(e),`objectHash: value must be an object`),ue(e)}function At(e){let t=5381,n=e.length;b(n>0,`stringHash: empty string`);for(let r=0;r<n;r++)t=t*33^e.charCodeAt(r);return(t>>>0).toString(36)}function jt(){return be().use(ve).use(ge).use(_e).use(ye,{allowDangerousHtml:!0}).use(fe,n({attributes:{"*":[`className`],svg:[`width`,`height`,`viewBox`,`fill`,`ariaHidden`],path:[`d`,`fill`,`stroke`,`strokeWidth`,`strokeLinecap`,`strokeLinejoin`]},tagNames:[`svg`,`g`,`path`,`div`],protocols:{src:[`data`]}},de)).use(pe,{allowDangerousHtml:!0})}function B(e){return(``+jt().processSync(e)).trim()}function V(e){return me(he(e),{includeHtml:!1,includeImageAlt:!1})}function Mt(e){return e}var H=class e{x;y;constructor(e,t){this.x=e,this.y=t,b(typeof e==`number`&&!isNaN(e)&&isFinite(e)&&typeof t==`number`&&!isNaN(t)&&isFinite(t),`Invalid arguments for Vector: (${e}, ${t})`)}static create(...t){return t.length===2?new e(t[0],t[1]):new e(t[0].x,t[0].y)}static add(e,t){return{x:e.x+t.x,y:e.y+t.y}}static subtract(e,t){return{x:e.x-t.x,y:e.y-t.y}}static multiply(e,t){return{x:e.x*t,y:e.y*t}}static divide(e,t){return{x:e.x/t,y:e.y/t}}static dot(e,t){return e.x*t.x+e.y*t.y}add(t){return new e(this.x+t.x,this.y+t.y)}subtract(t){return new e(this.x-t.x,this.y-t.y)}multiply(t){return new e(this.x*t,this.y*t)}divide(t){return new e(this.x/t,this.y/t)}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}length(){return this.x===0&&this.y===0?0:Math.sqrt(this.x**2+this.y**2)}normalize(){let t=this.length();return t===0?new e(0,0):new e(this.x/t,this.y/t)}round(){return new e(Math.round(this.x),Math.round(this.y))}trunc(){return new e(Math.trunc(this.x),Math.trunc(this.y))}toObject(){return{x:this.x,y:this.y}}};function Nt(...e){return e.length===1&&e[0]instanceof H?e[0]:e.length===2?new H(e[0],e[1]):new H(e[0].x,e[0].y)}function Pt(e,t){return e[Ft]===t}const Ft=`_stage`,It=`_type`,Lt=`_layout`;var Rt=e({DeploymentFqn:()=>Gt,EdgeId:()=>Zt,Fqn:()=>Ut,GlobalFqn:()=>W,GroupElementKind:()=>U,MarkdownOrString:()=>Bt,NodeId:()=>Xt,NoneIcon:()=>Ht,ProjectId:()=>zt,RelationId:()=>qt,StepEdgeKind:()=>$t,ViewId:()=>Kt,extractStep:()=>en,flattenMarkdownOrString:()=>Vt,isGlobalFqn:()=>Jt,isGroupElementKind:()=>Wt,isStepEdgeId:()=>G,splitGlobalFqn:()=>Yt,stepEdgeId:()=>Qt});function zt(e){return e}function Bt(e){return typeof e==`string`?{txt:e}:e}function Vt(e){if(a(e))return null;let t=h(e)?e:e.txt??e.md;return c(t?.trim())?t:null}const Ht=`none`;function Ut(e,t){return t?t+`.`+e:e}const U=`@group`;function Wt(e){return e.kind===U}function Gt(e,t){return t?t+`.`+e:e}function Kt(e){return e}function qt(e){return e}function W(e,t){return b(typeof e==`string`&&e!=``),`@`+e+`.`+t}function Jt(e){return e.startsWith(`@`)}function Yt(e){if(!e.startsWith(`@`))return[null,e];let t=e.indexOf(`.`);if(t<2)throw Error(`Invalid global FQN`);return[e.slice(1,t),e.slice(t+1)]}function Xt(e){return e}function Zt(e){return e}function Qt(e,t){let n=`step-${String(e).padStart(2,`0`)}`;return t?`${n}.${t}`:n}const $t=`@step`;function G(e){return e.startsWith(`step-`)}function en(e){if(!G(e))throw Error(`Invalid step edge id: ${e}`);return parseFloat(e.slice(5))}let K;(function(e){function t(e){return`model`in e&&!(`project`in e)}e.isElementRef=t;function n(e){return`project`in e&&`model`in e}e.isImportRef=n;function r(e){if(h(e))throw Error(`Expected FqnRef, got: "${e}"`);if(n(e))return W(e.project,e.model);if(t(e))return e.model;throw Error(`Expected FqnRef.ModelRef or FqnRef.ImportRef`)}e.flatten=r;function i(e){return t(e)||n(e)}e.isModelRef=i;function a(e){return`deployment`in e&&`element`in e}e.isInsideInstanceRef=a;function o(e){return`deployment`in e&&!(`element`in e)}e.isDeploymentElementRef=o;function s(e){return o(e)||a(e)}e.isDeploymentRef=s})(K||={});let q;(function(e){function t(e){return`wildcard`in e&&e.wildcard===!0}e.isWildcard=t;function n(e){return`ref`in e&&K.isModelRef(e.ref)}e.isModelRef=n;function r(e){return`ref`in e&&K.isDeploymentRef(e.ref)}e.isDeploymentRef=r;function i(e){return`elementKind`in e&&`isEqual`in e}e.isElementKindExpr=i;function a(e){return`elementTag`in e&&`isEqual`in e}e.isElementTagExpr=a;function o(e){return`where`in e&&c(e.where.expr)}e.isWhere=o;function s(e){return`custom`in e&&(c(e.custom.expr)||o(e.custom.expr))}e.isCustom=s;function c(e){return t(e)||n(e)||r(e)||i(e)||a(e)}e.is=c;function l(e){return s(e)&&(e=e.custom.expr),o(e)&&(e=e.where.expr),e}e.unwrap=l})(q||={});let J;(function(e){function t(e){return`source`in e&&`target`in e}e.isDirect=t;function n(e){return`incoming`in e}e.isIncoming=n;function r(e){return`outgoing`in e}e.isOutgoing=r;function i(e){return`inout`in e}e.isInOut=i;function a(e){return`where`in e&&(t(e.where.expr)||n(e.where.expr)||r(e.where.expr)||i(e.where.expr))}e.isWhere=a;function o(e){return`customRelation`in e}e.isCustom=o;function s(e){return t(e)||n(e)||r(e)||i(e)}e.is=s;function c(e){return o(e)&&(e=e.customRelation.expr),a(e)&&(e=e.where.expr),e}e.unwrap=c})(J||={});let tn;(function(e){function t(e){return`where`in e}e.isWhere=t;function n(e){return J.isWhere(e)}e.isRelationWhere=n;function r(e){return q.isWhere(e)}e.isFqnExprWhere=r;function i(e){return q.is(e)||q.isWhere(e)||q.isCustom(e)}e.isFqnExpr=i;function a(e){return J.is(e)||J.isWhere(e)||J.isCustom(e)}e.isRelation=a})(tn||={});let Y;(function(e){function t(e){return`wildcard`in e&&e.wildcard===!0}e.isWildcard=t;function n(e){return`ref`in e&&K.isModelRef(e.ref)}e.isModelRef=n;function r(e){return`elementKind`in e&&`isEqual`in e}e.isElementKindExpr=r;function i(e){return`elementTag`in e&&`isEqual`in e}e.isElementTagExpr=i;function a(e){return`where`in e&&s(e.where.expr)}e.isWhere=a;function o(e){return`custom`in e&&(s(e.custom.expr)||a(e.custom.expr))}e.isCustom=o;function s(e){return t(e)||n(e)||r(e)||i(e)}e.is=s;function c(e){return o(e)&&(e=e.custom.expr),a(e)&&(e=e.where.expr),e}e.unwrap=c})(Y||={});let X;(function(e){function t(e){return`source`in e&&`target`in e}e.isDirect=t;function n(e){return`incoming`in e}e.isIncoming=n;function r(e){return`outgoing`in e}e.isOutgoing=r;function i(e){return`inout`in e}e.isInOut=i;function a(e){return`where`in e&&(t(e.where.expr)||n(e.where.expr)||r(e.where.expr)||i(e.where.expr))}e.isWhere=a;function o(e){return`customRelation`in e}e.isCustom=o;function s(e){return t(e)||n(e)||r(e)||i(e)}e.is=s;function c(e){return o(e)&&(e=e.customRelation.expr),a(e)&&(e=e.where.expr),e}e.unwrap=c})(X||={});let nn;(function(e){function t(e){return`where`in e}e.isWhere=t;function n(e){return X.isWhere(e)}e.isRelationWhere=n;function r(e){return Y.isWhere(e)}e.isFqnExprWhere=r;function i(e){return Y.is(e)||Y.isWhere(e)||Y.isCustom(e)}e.isFqnExpr=i;function a(e){return X.is(e)||X.isWhere(e)||X.isCustom(e)}e.isRelationExpr=a})(nn||={});function rn(e){return c(e.kind)&&!c(e.element)}function an(e){return c(e.element)&&!c(e.kind)}const on={fill:`#3b82f6`,stroke:`#2563eb`,hiContrast:`#eff6ff`,loContrast:`#bfdbfe`},sn={fill:`#0284c7`,stroke:`#0369a1`,hiContrast:`#f0f9ff`,loContrast:`#B6ECF7`},cn={fill:`#64748b`,stroke:`#475569`,hiContrast:`#f8fafc`,loContrast:`#cbd5e1`},ln={primary:on,blue:on,secondary:sn,sky:sn,muted:cn,slate:cn,gray:{fill:`#737373`,stroke:`#525252`,hiContrast:`#fafafa`,loContrast:`#d4d4d4`},red:{fill:`#AC4D39`,stroke:`#853A2D`,hiContrast:`#FBD3CB`,loContrast:`#f5b2a3`},green:{fill:`#428a4f`,stroke:`#2d5d39`,hiContrast:`#f8fafc`,loContrast:`#c2f0c2`},amber:{fill:`#A35829`,stroke:`#7E451D`,hiContrast:`#FFE0C2`,loContrast:`#f9b27c`},indigo:{fill:`#6366f1`,stroke:`#4f46e5`,hiContrast:`#eef2ff`,loContrast:`#c7d2fe`}},un={line:`#8D8D8D`,labelBg:`#18191B`,label:`#C9C9C9`},dn={line:`#64748b`,labelBg:`#0f172a`,label:`#cbd5e1`},fn={line:`#3b82f6`,labelBg:`#172554`,label:`#eff5fd`},pn={line:`#0ea5e9`,labelBg:`#082f49`,label:`#d4f2ff`},mn={amber:{line:`#b45309`,labelBg:`#78350f`,label:`#FFE0C2`},blue:fn,gray:un,green:{line:`#15803d`,labelBg:`#052e16`,label:`#bbfcd3`},indigo:{line:`#6366f1`,labelBg:`#1e1b4b`,label:`#cbd0fd`},muted:dn,primary:fn,red:{line:`#AC4D39`,labelBg:`#b91c1c`,label:`#fcd9d2`},secondary:pn,sky:pn,slate:dn},hn={sizes:{xs:{width:180,height:100},sm:{width:240,height:135},md:{width:320,height:180},lg:{width:420,height:234},xl:{width:520,height:290}},spacing:{xs:8,sm:10,md:16,lg:24,xl:32},textSizes:{xs:13.33,sm:16,md:19.2,lg:23.04,xl:27.65},iconSizes:{xs:24,sm:36,md:60,lg:82,xl:90}},gn=[`xs`,`sm`,`md`,`lg`,`xl`],_n=[`left`,`right`,`top`,`bottom`],vn=[`solid`,`dashed`,`dotted`,`none`],yn=[`rectangle`,`person`,`browser`,`mobile`,`cylinder`,`storage`,`queue`,`bucket`,`document`,`component`],bn=[`amber`,`blue`,`gray`,`slate`,`green`,`indigo`,`muted`,`primary`,`red`,`secondary`,`sky`],xn=[`tomato`,`grass`,`blue`,`ruby`,`orange`,`indigo`,`pink`,`teal`,`purple`,`amber`,`crimson`,`red`,`lime`,`yellow`,`violet`],Sn={tomato:je.tomato9,grass:Ee.grass9,blue:ke.blue9,ruby:Ce.ruby9,orange:Ne.orange9,indigo:xe.indigo9,pink:Se.pink9,teal:we.teal9,purple:De.purple9,amber:Pe.amber9,crimson:Me.crimson9,red:Fe.red9,lime:Ae.lime9,yellow:Te.yellow9,violet:Oe.violet9};function Cn(e){return e in Sn}const wn={colors:bn.reduce((e,t)=>(e[t]={elements:ln[t],relationships:mn[t]},e),{}),...hn};function Tn(e,t){return t=Math.max(-1,Math.min(1,t)),e.map(e=>{let n=t>0?e+(255-e)*t:e*(1+t);return Math.round(Math.max(0,Math.min(255,n)))})}function En(e,t){return v(Tn(v(e).rgb(),t)).hex()}function Dn(e){b(v.valid(e),`Invalid color: ${e}`);let t=e.trim(),n=On(t.startsWith(`#`)?t:v(t).hex());return{elements:{fill:n.el_main,stroke:n.el_secondary,hiContrast:n.el_hiContrast,loContrast:n.el_loContrast},relationships:{line:n.rel_secondary,label:n.rel_hiContrast,labelBg:n.rel_main}}}function On(e){let t=e,n=v(t).darken(.8).hex(),r=kn(t),i=r.hiContrast,a=r.loContrast,o=t;return{el_main:t,el_secondary:n,el_hiContrast:i,el_loContrast:a,rel_main:o,rel_secondary:En(t,-.25),rel_hiContrast:kn(o).hiContrast}}function kn(e){let t=v(e),n=t.brighten(2),r=t.darken(2),i,a,o,s;do i=n,a=r,n=n.brighten(1),r=r.darken(1),o=v.contrastAPCA(t,n),s=v.contrastAPCA(t,r);while(Math.abs(o)<60&&Math.abs(s)<60&&(!p(n,i)||!p(r,a)));return Math.abs(o)>Math.abs(s)?{hiContrast:v(n.brighten(.4)).hex(),loContrast:n.hex()}:{hiContrast:v(r.darken(.4)).hex(),loContrast:r.hex()}}function An(e,t){let n=t??6,r=v(e.fill),i=v(e.stroke),a=r.luminance()>.8,o=m(g(v.scale(a?[r.darken(.02).desaturate(.05),r.darken(.1).desaturate(.1)]:[r.shade(.12,`lch`).desaturate(.05),r.shade(.35,`lch`).desaturate(.4)]).mode(`oklch`).correctLightness().colors(n,null),v.scale(a?[i.darken(.04).desaturate(.05),i.darken(.12).desaturate(.1)]:[i.shade(.15,`lch`).desaturate(.08),i.shade(.4,`lch`).desaturate(.4)]).mode(`oklch`).correctLightness().colors(n,null)),f(([t,n])=>({...e,fill:t.hex(),stroke:n.hex()})));return b(o.length===n,`Expected ${n} colors, got ${o.length}`),o}const jn={color:`primary`,size:`md`,opacity:15,shape:`rectangle`,group:{opacity:15,border:`dashed`},relationship:{color:`gray`,line:`dashed`,arrow:`normal`}},Mn=wn,Z={theme:Mn,defaults:jn};var Nn=class e{config;customCss;theme;defaults;static DEFAULT=new e(Z);static from(t,r){if(!t&&!r)return this.DEFAULT;let{customCss:i,theme:o,defaults:s}={...t},c=n({theme:o},{defaults:{...s}},{theme:{colors:{...r}}},Z);return a(i?.content)&&p(c,Z)?this.DEFAULT:new e(c,i)}constructor(e,t){this.config=e,this.customCss=t,this.theme=e.theme,this.defaults=e.defaults}get fingerprint(){return R(this,`fingerprint`,()=>z({config:this.config,customCss:this.customCss}))}get elementColors(){return this.theme.colors[this.defaults.color].elements}get relationshipColors(){return this.theme.colors[this.defaults.relationship.color].relationships}get groupColors(){let e=this.defaults.group?.color;if(!e)return this.elementColors;if(!this.isThemeColor(e))throw Error(`Default group color not found in theme: ${e}`);return R(this,`defaultGroup`,()=>({...this.elementColors,...this.theme.colors[e].elements}))}isDefaultColor(e){return e===this.defaults.color}colors(e){return this.computeFrom(e??this.defaults.color)}compoundColorsCache=new oe.default(e=>new ce.default(t=>An(e,t)));colorsForCompounds(e,t){return this.compoundColorsCache.get(e).get(t??6)}fontSize(e){return e??=this.defaults.text??this.defaults.size,this.theme.textSizes[e]}padding(e){return e??=this.defaults.padding??this.defaults.size,this.theme.spacing[e]}iconSize(e){return e??=this.defaults.size,this.theme.iconSizes[e]}isThemeColor(e){return e in this.theme.colors}nodeSizes(e){let t=Pn(e,this.defaults.size);return{sizes:t,values:{sizes:this.theme.sizes[t.size],padding:this.padding(t.padding),textSize:this.fontSize(t.textSize),iconSize:this.iconSize(t.iconSize)}}}computeFrom(e){if(this.isThemeColor(e))return this.theme.colors[e];if(!v.valid(e))throw Error(`Invalid color value: "${e}" (not a theme color and not a valid CSS color)`);return Dn(e)}equals(e){return e===this?!0:this.constructor===e.constructor?this.fingerprint===e.fingerprint:!1}tagColor(e){return this.isThemeColor(e)?this.theme.colors[e].elements:Cn(e)?this.computeFrom(Sn[e]).elements:this.computeFrom(e).elements}};function Pn({size:e,padding:t,textSize:n,iconSize:r,...i},a=Z.defaults.size){return e??=a,n??=e,t??=e,r??=e,{...i,size:e,padding:t,textSize:n,iconSize:r}}function Fn(e){let t=typeof e==`string`?e:e.color;return t.startsWith(`#`)||t.startsWith(`rgb`)}function In(e){return`tag`in e}function Ln(e){return`kind`in e}function Rn(e){return`metadata`in e}function zn(e){return`participant`in e}function Bn(e){return`not`in e}function Vn(e){return`and`in e}function Hn(e){return`or`in e}function Q(e){switch(!0){case zn(e):{let t=e.participant;return Un(t,Q(e.operator))}case In(e):{if(h(e.tag)||`eq`in e.tag){let t=h(e.tag)?e.tag:e.tag.eq;return e=>Array.isArray(e.tags)&&e.tags.includes(t)}let t=e.tag.neq;return e=>!Array.isArray(e.tags)||!e.tags.includes(t)}case Ln(e):{if(h(e.kind)||`eq`in e.kind){let t=h(e.kind)?e.kind:e.kind.eq;return e=>e.kind===t}let t=e.kind.neq;return e=>o(e.kind)||e.kind!==t}case Rn(e):{let{key:t,value:n}=e.metadata;if(n===void 0)return e=>e.metadata!=null&&t in e.metadata&&e.metadata[t]!=null;if(h(n)||`eq`in n){let e=h(n)?n:n.eq;return n=>{if(!n.metadata)return!1;let r=n.metadata[t];return Array.isArray(r)?r.includes(e):r===e}}let r=n.neq;return e=>{if(!e.metadata)return!0;let n=e.metadata[t];return n==null?!0:Array.isArray(n)?!n.includes(r):n!==r}}case Bn(e):return s(Q(e.not));case Vn(e):return ne(e.and.map(Q));case Hn(e):return ie(e.or.map(Q));default:x(e)}}function Un(e,t){return n=>{if(!n.source||!n.target)return!1;switch(e){case`source`:return t(n.source);case`target`:return t(n.target)}}}function Wn(e){return`include`in e||`exclude`in e}function Gn(e){return`targets`in e&&`style`in e}function Kn(e){return e._stage===`computed`}function qn(e){return e._stage===`layouted`}function $(e){return e._type===`element`}function Jn(e){return $(e)&&c(e.viewOf)}function Yn(e){return $(e)&&c(e.extends)}function Xn(e){return e._type===`deployment`}function Zn(e){return e._type===`dynamic`}function Qn(e){return`styleId`in e}function $n(e){return`predicateId`in e}function er(e){return e===`TB`||e===`BT`||e===`LR`||e===`RL`}function tr(e){return`direction`in e}function nr(e){return G(e)&&e.includes(`.`)?e.slice(0,e.indexOf(`.`)+1):null}function rr(e){return!!e&&!(`__series`in e||`__parallel`in e)}function ir(e){return!!e&&`__parallel`in e&&r(e.__parallel)}function ar(e){return!!e&&`__series`in e&&r(e.__series)}function or(e){return`title`in e&&`groupRules`in e&&Array.isArray(e.groupRules)}function sr(e){return`rank`in e&&Array.isArray(e.targets)}const cr=Symbol.for(`text`),lr=Symbol.for(`html`);var ur=class e{static mdcache=new _.default(500);static txtcache=new _.default(500);static getOrCreateFromText(t){if(t=t.trimEnd(),t===``)return e.EMPTY;let n=e.txtcache.get(t);return n||(n=new e({txt:t}),e.txtcache.set(t,n),n)}static getOrCreateFromMarkdown(t){if(t=t.trimEnd(),t===``)return e.EMPTY;let n=e.mdcache.get(t);return n||(n=new e({md:t}),e.mdcache.set(t,n),n)}static memoize(t,n,r){return R(t,n,()=>e.from(r))}static from(t){return t==null||t===e.EMPTY?e.EMPTY:t instanceof e?t:typeof t==`string`?this.getOrCreateFromText(t):`isEmpty`in t&&t.isEmpty?e.EMPTY:`md`in t?this.getOrCreateFromMarkdown(t.md):this.getOrCreateFromText(t.txt)}static EMPTY=new class extends e{isEmpty=!0;nonEmpty=!1;isMarkdown=!1;$source=null;constructor(){super({txt:``})}get text(){return null}get md(){return null}get html(){return null}};$source;isEmpty;nonEmpty;isMarkdown;constructor(e){this.isMarkdown=!1,typeof e==`string`?(this.$source={txt:e},this.isEmpty=e.trim()===``):(this.$source=e,this.isEmpty=!0,`md`in e?(this.isEmpty=e.md===``,this.isMarkdown=!0):this.isEmpty=e.txt===``),this.nonEmpty=!this.isEmpty}get text(){if(this.isEmpty||this.$source===null)return``;let e=this.$source;return`txt`in e?e.txt:R(this,cr,()=>V(e.md))}get md(){if(this.isEmpty||this.$source===null)return``;let e=this.$source;if(`md`in e)return e.md;if(`txt`in e)return e.txt;x(e)}get html(){if(this.isEmpty||this.$source===null)return``;let e=this.$source;return`txt`in e?e.txt:R(this,lr,()=>B(e.md))}equals(t){return this===t?!0:t instanceof e?this.isEmpty&&t.isEmpty?!0:this.isEmpty!==t.isEmpty||this.isMarkdown!==t.isMarkdown?!1:this.isMarkdown?this.$source?.md===t.$source?.md:this.$source?.txt===t.$source?.txt:!1}};export{W as $,tt as $t,Pn as A,Tt as At,bn as B,gt as Bt,Rn as C,Be as Cn,V as Ct,In as D,Re as Dn,Et as Dt,zn as E,y as En,z as Et,vn as F,bt as Ft,X as G,ut as Gt,rn as H,pt as Ht,xn as I,yt as It,J,st as Jt,tn as K,lt as Kt,yn as L,R as Lt,Mn as M,wt as Mt,jn as N,xt as Nt,Q as O,Le as On,Dt as Ot,Dn as P,vt as Pt,Ut as Q,it as Qt,_n as R,_t as Rt,Ln as S,b as Sn,Mt as St,Hn as T,ze as Tn,At as Tt,nn as U,ft as Ut,an as V,mt as Vt,Y as W,dt as Wt,Gt as X,at as Xt,K as Y,ot as Yt,Zt as Z,rt as Zt,Yn as _,We as _n,Ft as _t,rr as a,j as an,qt as at,Gn as b,Ve as bn,H as bt,er as c,D as cn,en as ct,Qn as d,Ke as dn,Wt as dt,N as en,U as et,Kn as f,Ge as fn,G as ft,$ as g,w as gn,Lt as gt,Zn as h,$e as hn,Qt as ht,nr as i,Xe as in,zt as it,Nn as j,Ot as jt,Fn as k,Ie as kn,kt,tr as l,qe as ln,Vt as lt,qn as m,M as mn,Yt as mt,or as n,Ye as nn,Xt as nt,ir as o,Je as on,$t as ot,Xn as p,Ze as pn,Rt as pt,q,ct as qt,sr as r,A as rn,Ht as rt,ar as s,k as sn,Kt as st,ur as t,et as tn,Bt as tt,$n as u,O as un,Jt as ut,Jn as v,Ue as vn,It as vt,Bn as w,x as wn,B as wt,Vn as x,S as xn,Nt as xt,Wn as y,He as yn,Pt as yt,gn as z,ht as zt};
|
package/dist/builder/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
export { $autoLayout, $deploymentExpr, $exclude, $expr, $include, $rules, $style, AddDeployedInstance, AddDeploymentNode, AddDeploymentNodeHelpers, AddDeploymentRelation, AddDeploymentViewHelper, AddDeploymentViewRules, AddElement, AddElementHelpers, AddViewHelper, AddViewOfHelper, AddViewRules, AnyTypes, AnyTypesNested, Builder, BuilderMethods, BuilderProjectSpecification, BuilderSpecification, DeloymentModelBuildFunction, DeloymentModelHelpers, DeploymentModelBuilder, DeploymentRulesBuilderOp, DeploymentViewBuilder, ElementViewBuilder, ElementViewRulesBuilder, Invalid, LikeC4ViewBuilder, Metadata, ModelBuilder, ModelBuilderFunction, ModelHelpers, NestedRelationshipHelper, NewDeploymentNodeProps, NewElementProps, NewRelationProps, NewViewProps, RelationshipHelper, TypedAddViewOfHelper, Types, TypesNested, ValidId, ViewPredicate, ViewsBuilder, ViewsBuilderFunction, ViewsHelpers, Warn, deployment, mkViewBuilder, model, views };
|
|
1
|
+
import { $ as DeloymentModelBuildFunction, A as $includeAncestors, B as LikeC4ViewBuilder, C as AddViewHelper, D as ElementViewRulesBuilder, E as ElementViewBuilder, F as $autoLayout, G as ModelHelpers, H as AddElementHelpers, I as $exclude, J as model, K as NestedRelationshipHelper, L as $include, M as AddDeploymentViewRules, N as DeploymentRulesBuilderOp, O as TypedAddViewOfHelper, P as DeploymentViewBuilder, Q as AddDeploymentRelation, R as $rules, S as $expr, T as AddViewRules, U as ModelBuilder, V as ViewPredicate, W as ModelBuilderFunction, X as AddDeployedInstance, Y as AddElement, Z as AddDeploymentNodeHelpers, _ as ViewsBuilder, a as Invalid, b as mkViewBuilder, c as NewElementProps, d as Types, et as DeloymentModelHelpers, f as TypesNested, g as BuilderMethods, h as Builder, i as BuilderSpecification, j as AddDeploymentViewHelper, k as $deploymentExpr, l as NewRelationProps, m as Warn, n as AnyTypesNested, nt as deployment, o as Metadata, p as ValidId, q as RelationshipHelper, r as BuilderProjectSpecification, rt as AddDeploymentNode, s as NewDeploymentNodeProps, t as AnyTypes, tt as DeploymentModelBuilder, u as NewViewProps, v as ViewsBuilderFunction, w as AddViewOfHelper, x as views, y as ViewsHelpers, z as $style } from "../_chunks/_types.mjs";
|
|
2
|
+
export { $autoLayout, $deploymentExpr, $exclude, $expr, $include, $includeAncestors, $rules, $style, AddDeployedInstance, AddDeploymentNode, AddDeploymentNodeHelpers, AddDeploymentRelation, AddDeploymentViewHelper, AddDeploymentViewRules, AddElement, AddElementHelpers, AddViewHelper, AddViewOfHelper, AddViewRules, AnyTypes, AnyTypesNested, Builder, BuilderMethods, BuilderProjectSpecification, BuilderSpecification, DeloymentModelBuildFunction, DeloymentModelHelpers, DeploymentModelBuilder, DeploymentRulesBuilderOp, DeploymentViewBuilder, ElementViewBuilder, ElementViewRulesBuilder, Invalid, LikeC4ViewBuilder, Metadata, ModelBuilder, ModelBuilderFunction, ModelHelpers, NestedRelationshipHelper, NewDeploymentNodeProps, NewElementProps, NewRelationProps, NewViewProps, RelationshipHelper, TypedAddViewOfHelper, Types, TypesNested, ValidId, ViewPredicate, ViewsBuilder, ViewsBuilderFunction, ViewsHelpers, Warn, deployment, mkViewBuilder, model, views };
|
package/dist/builder/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"../_chunks/libs/defu.mjs";import{B as t,C as n,F as r,M as i,Q as a,T as o,U as s,W as c,X as l,Y as u,et as d,k as f,w as p}from"../_chunks/libs/remeda.mjs";import{On as m,V as h,W as g,Y as _,_t as v,dn as y,g as b,ln as x,mt as S,un as C,ut as w,vt as T,xn as E}from"../_chunks/types.mjs";import{t as D}from"../_chunks/libs/mnemonist.mjs";import"../_chunks/model.mjs";import{n as O,t as k}from"../_chunks/Builder.view-element.mjs";import{t as A}from"../_chunks/assignTagColors.mjs";function j(e){if(f(e)){let t=e;switch(!0){case t.startsWith(`tag is not #`):return{tag:{neq:t.replace(`tag is not #`,``)}};case t.startsWith(`tag is #`):return{tag:{eq:t.replace(`tag is #`,``)}};case t.startsWith(`kind is not `):return{kind:{neq:t.replace(`kind is not `,``)}};case t.startsWith(`kind is `):return{kind:{eq:t.replace(`kind is `,``)}};case t.startsWith(`source.`):return{operator:j(t.replace(`source.`,``)),participant:`source`};case t.startsWith(`target.`):return{operator:j(t.replace(`target.`,``)),participant:`target`};default:throw Error(`Unknown where operator: ${e}`)}}if(e.and)return{and:o(e.and,j)};if(e.or)return{or:o(e.or,j)};if(e.not)return{not:j(e.not)};throw Error(`Unknown where operator: ${e}`)}function M(...e){return t=>{if(e.length===2&&typeof e[1]!=`string`&&(`where`in e[1]||`with`in e[1])){let n=t.$expr(e[0]),r=e[1].where?j(e[1].where):void 0;r&&(n={where:{expr:n,condition:r}});let i=e[1].with;return i&&(n=g.is(e[0])?{custom:{...i,expr:n}}:{customRelation:{...i,expr:n}}),t.include(n),t}return t.include(...e.map(e=>t.$expr(e))),t}}function N(...e){return t=>{let n=t.$expr(e[0]);if(e.length===2&&e[1].where){let t=j(e[1].where);n={where:{expr:n,condition:t}}}return t.exclude(n),t}}function P(e,{notation:n,...r}){return i=>i.style({targets:(t(e)?e:[e]).map(e=>i.$expr(e)),...n?{notation:n}:{},style:{...r}})}function F(e,t){return n=>n.autoLayout(e,t)}function I(...e){return t=>e.reduce((e,t)=>t(e),t)}function L(e){if(!f(e))return e;let t=e=>e;if(e===`*`)return t({wildcard:!0});if(e.startsWith(`->`))return e.endsWith(`->`)?t({inout:L(e.replace(/->/g,``).trim())}):t({incoming:L(e.replace(`-> `,``))});if(e.endsWith(` ->`))return t({outgoing:L(e.replace(` ->`,``))});if(e.includes(` <-> `)){let[n,r]=e.split(` <-> `);return t({source:L(n),target:L(r),isBidirectional:!0})}if(e.includes(` -> `)){let[n,r]=e.split(` -> `);return t({source:L(n),target:L(r)})}return e.endsWith(`._`)?t({ref:{deployment:e.replace(`._`,``)},selector:`expanded`}):e.endsWith(`.**`)?t({ref:{deployment:e.replace(`.**`,``)},selector:`descendants`}):e.endsWith(`.*`)?t({ref:{deployment:e.replace(`.*`,``)},selector:`children`}):t({ref:{deployment:e}})}function R(e){let t={$expr:e._type===`deployment`?L:k,autoLayout(n,r){return e.rules.push(m({direction:n,rankSep:r?.rank,nodeSep:r?.node})),t},exclude(...n){return e.rules.push({exclude:n}),t},include(...n){return e.rules.push({include:n}),t},style(n){return e.rules.push(n),t},get Expr(){throw Error(`Expr is not available in runtime`)},get Types(){throw Error(`Types are not available in runtime`)},get ElementExpr(){throw Error(`ElementExpr is not available in runtime`)},get TypedExpr(){throw Error(`TypedExpr is not available in runtime`)}};return t}function z(e){return t(e)?s(e,e=>({})):e}function B({tags:e,elements:t,deployments:n,relationships:r,...i}){let a={};e&&Object.assign(a,z(e));let o=z(t);for(let[e,t]of l(o))if(t.tags)for(let n of t.tags)E(n in a,`Invalid specification for element kind "${e}": tag "${n}" not found`);let s=z(n??{});for(let[e,t]of l(s))if(t.tags)for(let n of t.tags)E(n in a,`Invalid specification for deployment kind "${e}": tag "${n}" not found`);return{...i,tags:a,elements:o,deployments:s,relationships:z(r??{})}}function V(e){return i(e)?null:typeof e==`string`?{txt:e}:e}function H(t,s=new Map,l=[],f=new Map,g={predicates:{},dynamicPredicates:{},styles:{}},k=new Map,j=[],L=new D.default(()=>new Map)){let z=B(t),U=()=>({elements:structuredClone(z.elements),deployments:structuredClone(z.deployments),relationships:structuredClone(z.relationships),tags:A(structuredClone(z.tags)),...z.metadataKeys?{metadataKeys:z.metadataKeys}:{},customColors:{}}),W=e=>{if(!(!e||!a(e,1)))return o(e,e=>typeof e==`string`?{url:e}:e)},G=(e,t,n)=>{r(t)&&(n=t,t={}),t??={};let{links:i=[],title:a=null,description:o=null,tags:s=[],...c}=typeof t==`string`?{title:t}:{...t},l=W(i);return[m({id:e,title:a,description:V(o),tags:s,links:l,_stage:`parsed`,...c}),n]},K=e=>{let[t,n]=S(e),r=(t?L.get(t):s).get(n);return E(r,`Element with id "${e}" not found`),r},q=e=>{if(typeof e==`string`){let[t,n]=S(e);return t?{project:t,model:n}:{model:n}}return`project`in e||`deployment`in e?e:q(e.model)},J={get Types(){throw Error(`Types are not available in runtime`)},clone:()=>{let e=new D.default(()=>new Map);for(let[t,n]of L)e.set(t,structuredClone(n));return H(structuredClone(z),structuredClone(s),structuredClone(l),structuredClone(f),structuredClone(g),structuredClone(k),structuredClone(j),e)},__addElement:e=>{let[t,n]=S(e.id),r=y(n),i=t?L.get(t):s;if(r&&E(i.get(r),`Parent element with id "${r}" not found for element with id "${e.id}"`),i.has(n))throw Error(`Element with id "${e.id}" already exists`);return i.set(n,t?{...e,id:n}:e),J},__addRelation(e){let t=q(e.source),n=_.flatten(t),r=q(e.target),i=_.flatten(r),a=K(n),o=K(i);if(w(n)&&w(i))throw Error(`Cannot create relationship between global elements`);return!w(n)&&!w(i)&&E(!x(a,o),`Cannot create relationship between elements in the same hierarchy`),l.push({id:`rel${l.length+1}`,...e,source:t,target:r}),J},__fqn(e){return E(e.trim()!==``,`Id must be non-empty`),e},__deploymentFqn(e){return E(e.trim()!==``,`Id must be non-empty`),e},__addSourcelessRelation(){throw Error(`Can be called only in nested model`)},__addView:e=>{if(f.has(e.id))throw Error(`View with id "${e.id}" already exists`);return b(e)&&`viewOf`in e&&E(s.get(e.viewOf),`Invalid scoped view ${e.id}, wlement with id "${e.viewOf}" not found`),f.set(e.id,e),J},__addDeployment:e=>{if(k.has(e.id))throw Error(`Deployment with id "${e.id}" already exists`);let t=y(e.id);return t&&E(k.get(t),`Parent element with id "${t}" not found for node with id "${e.id}"`),h(e)&&(E(t,`Instance ${e.id} of ${e.element} must be deployed under a parent node`),E(s.get(e.element),`Instance "${e.id}" references non-existing element "${e.element}"`)),k.set(e.id,e),J},__addDeploymentRelation:e=>(E(!x(e.source.deployment,e.target.deployment),`Cannot create relationship between elements in the same hierarchy`),E(k.has(e.source.deployment),`Relation "${e.source.deployment} -> ${e.target.deployment}" references non-existing source`),E(k.has(e.target.deployment),`Relation "${e.source.deployment} -> ${e.target.deployment}" references non-existing target`),j.push({id:`deploy_rel${j.length+1}`,...e}),J),build:e=>({[v]:`parsed`,projectId:typeof e==`string`?e:e?.id??`from-builder`,project:{id:typeof e==`string`?e:`from-builder`,...typeof e==`object`&&e?e:{}},specification:U(),elements:c(structuredClone(Array.from(s.entries()))),relations:p(l,e=>[e.id,structuredClone(e)]),globals:structuredClone(g),deployments:{elements:c(structuredClone(Array.from(k.entries()))),relations:p(j,e=>[e.id,structuredClone(e)])},views:c(structuredClone(Array.from(f.entries()))),imports:d(Array.from(L.entries()),o(([e,t])=>[e,structuredClone([...t.values()])]),u(([e,t])=>t.length>0),c())}),toLikeC4Model:e=>O(J.build(e)),helpers:()=>({model:{model:(...e)=>t=>e.reduce((e,t)=>t(e),t),rel:(t,n,r)=>i=>{let{title:a=``,links:o=[],description:s=null,notes:c=null,...l}=e(typeof r==`string`?{title:r}:{...r},{title:null,links:null}),u=W(o);return i.__addRelation(m({source:{model:t},target:{model:n},title:a,...s&&{description:V(s)},...c&&{notes:V(c)},links:u,...l})),i},relTo:(t,n)=>r=>{let{title:i=``,links:a,description:o=null,notes:s=null,...c}=e(typeof n==`string`?{title:n}:{...n},{title:null,links:null});return r.__addSourcelessRelation(m({target:{model:t},title:i,...o&&{description:V(o)},...s&&{notes:V(s)},links:W(a),...c})),r},...n(z.elements,({style:e,...t},n)=>(r,i)=>{let a=(a=>{let{links:o,icon:s,color:c,shape:l,style:u,title:d,description:f,summary:p,...h}=typeof i==`string`?{title:i}:{...i},g=s??e?.icon,_=W(o),v=a.__fqn(r);return a.__addElement(m({id:v,kind:n,...t,title:d??t.title??C(v),...f&&{description:V(f)},...p&&{summary:V(p)},style:m({icon:g,color:c??e?.color,shape:l??e?.shape,border:e?.border,opacity:e?.opacity,size:e?.size,padding:e?.padding,textSize:e?.textSize,...u}),..._&&{links:_},...h})),a});return a.with=(...e)=>t=>{a(t);let{__fqn:n,__addSourcelessRelation:i}=t;try{t.__fqn=e=>`${n(r)}.${e}`,t.__addSourcelessRelation=e=>t.__addRelation({...e,source:{model:n(r)}}),e.reduce((e,t)=>t(e),t)}finally{t.__fqn=n,t.__addSourcelessRelation=i}return t},a})},views:{views:(...e)=>t=>e.reduce((e,t)=>t(e),t),view:(e,t,n)=>{let[r,i]=G(e,t,n),a={...r,[T]:`element`,rules:[]},o=e=>(e.__addView(a),i&&i(R(a)),e);return o.with=(...e)=>t=>{o(t);let n=R(a);for(let t of e)t(n);return t},o},viewOf:(e,t,n,r)=>{let[i,a]=G(e,n,r),o={...i,viewOf:t,[T]:`element`,rules:[]},s=e=>(e.__addView(o),a&&a(R(o)),e);return s.with=(...e)=>t=>{s(t);let n=R(o);for(let t of e)t(n);return t},s},deploymentView:(e,t,n)=>{let[r,i]=G(e,t,n),a={...r,[T]:`deployment`,rules:[]},o=e=>(e.__addView(a),i&&i(R(a)),e);return o.with=(...e)=>t=>{o(t);let n=R(a);for(let t of e)t(n);return t},o},$autoLayout:F,$exclude:N,$include:M,$rules:I,$style:P},deployment:{deployment:(...e)=>t=>e.reduce((e,t)=>t(e),t),instanceOf:(e,t,n)=>r=>{i(t)?(t=e,e=C(e)):typeof t==`string`?n??={}:(n=t,t=e,e=C(e));let{links:a,title:o,description:s,summary:c,icon:l,color:u,shape:d,style:f,...p}=typeof n==`string`?{title:n}:{...n},h=r.__deploymentFqn(e);return r.__addDeployment(m({id:h,element:t,...o&&{title:o},...c&&{summary:V(c)},...s&&{description:V(s)},style:m({icon:l,color:u,shape:d,...f}),links:W(a),...p})),r},rel:(e,t,n)=>r=>{let{title:i=null,links:a,description:o=null,notes:s=null,...c}=typeof n==`string`?{title:n}:{...n};return r.__addDeploymentRelation(m({source:{deployment:e},target:{deployment:t},title:i,...o&&{description:V(o)},...s&&{notes:V(s)},links:W(a),...c})),r},...n(z.deployments??{},({style:e,...t},n)=>(r,i)=>{let a=(a=>{let{links:o,icon:s,style:c,title:l,description:u,summary:d,color:f,shape:p,...h}=typeof i==`string`?{title:i}:{...i},g=s??e?.icon,_=W(o),v=a.__deploymentFqn(r);return a.__addDeployment(m({id:v,kind:n,...t,title:l??t.title??C(v),...u&&{description:V(u)},...d&&{summary:V(d)},style:m({icon:g,color:f??e?.color,shape:p??e?.shape,border:e?.border,opacity:e?.opacity,size:e?.size,padding:e?.padding,textSize:e?.textSize,...c}),..._&&{links:_},...h})),a});return a.with=(...e)=>t=>{a(t);let{__deploymentFqn:n}=t;try{t.__deploymentFqn=e=>`${n(r)}.${e}`,e.reduce((e,t)=>t(e),t)}finally{t.__deploymentFqn=n}return t},a})}}),with:(...e)=>{let t=J.clone();return e.reduce((e,t)=>t(e),t)},model:e=>{let t=J.clone(),n=t.helpers().model,r=n.model;return e({...n,_:r},r)(t)},deployment:e=>{let t=J.clone(),n=t.helpers().deployment,r=n.deployment;return e({...n,_:r},r)(t)},views:e=>{let t=J.clone(),n=t.helpers().views;return e({...n,_:n.views},n.views)(t)}};return J}const U={forSpecification(e){let t=H(e);return{...t.helpers(),builder:t}},specification(e){return H(e)}};export{U as Builder};
|
|
1
|
+
import{t as e}from"../_chunks/libs/defu.mjs";import{B as t,C as n,F as r,M as i,Q as a,T as o,U as s,W as c,X as l,Y as u,et as d,k as f,w as p}from"../_chunks/libs/remeda.mjs";import{Sn as m,V as h,W as g,Y as _,_t as v,dn as y,fn as b,g as x,kn as S,mt as C,un as w,ut as T,vt as E}from"../_chunks/types.mjs";import{t as D}from"../_chunks/libs/mnemonist.mjs";import"../_chunks/model.mjs";import{n as O,t as k}from"../_chunks/Builder.view-element.mjs";import{t as A}from"../_chunks/assignTagColors.mjs";function j(e){if(f(e)){let t=e;switch(!0){case t.startsWith(`tag is not #`):return{tag:{neq:t.replace(`tag is not #`,``)}};case t.startsWith(`tag is #`):return{tag:{eq:t.replace(`tag is #`,``)}};case t.startsWith(`kind is not `):return{kind:{neq:t.replace(`kind is not `,``)}};case t.startsWith(`kind is `):return{kind:{eq:t.replace(`kind is `,``)}};case t.startsWith(`source.`):return{operator:j(t.replace(`source.`,``)),participant:`source`};case t.startsWith(`target.`):return{operator:j(t.replace(`target.`,``)),participant:`target`};default:throw Error(`Unknown where operator: ${e}`)}}if(e.and)return{and:o(e.and,j)};if(e.or)return{or:o(e.or,j)};if(e.not)return{not:j(e.not)};throw Error(`Unknown where operator: ${e}`)}function M(...e){return t=>{if(e.length===2&&typeof e[1]!=`string`&&(`where`in e[1]||`with`in e[1])){let n=t.$expr(e[0]),r=e[1].where?j(e[1].where):void 0;r&&(n={where:{expr:n,condition:r}});let i=e[1].with;return i&&(n=g.is(n)?{custom:{...i,expr:n}}:{customRelation:{...i,expr:n}}),t.include(n),t}return t.include(...e.map(e=>t.$expr(e))),t}}function N(...e){return t=>{let n=t.$expr(e[0]);if(e.length===2&&e[1].where){let t=j(e[1].where);n={where:{expr:n,condition:t}}}return t.exclude(n),t}}function P(e,{notation:n,...r}){return i=>i.style({targets:(t(e)?e:[e]).map(e=>i.$expr(e)),...n?{notation:n}:{},style:{...r}})}function F(e,t){return n=>n.autoLayout(e,t)}function I(...e){return t=>e.reduce((e,t)=>t(e),t)}function L(e){if(!f(e))return e;let t=e=>e;if(e===`*`)return t({wildcard:!0});if(e.startsWith(`->`))return e.endsWith(`->`)?t({inout:L(e.replace(/->/g,``).trim())}):t({incoming:L(e.replace(`-> `,``))});if(e.endsWith(` ->`))return t({outgoing:L(e.replace(` ->`,``))});if(e.includes(` <-> `)){let[n,r]=e.split(` <-> `);return t({source:L(n),target:L(r),isBidirectional:!0})}if(e.includes(` -> `)){let[n,r]=e.split(` -> `);return t({source:L(n),target:L(r)})}return e.endsWith(`._`)?t({ref:{deployment:e.replace(`._`,``)},selector:`expanded`}):e.endsWith(`.**`)?t({ref:{deployment:e.replace(`.**`,``)},selector:`descendants`}):e.endsWith(`.*`)?t({ref:{deployment:e.replace(`.*`,``)},selector:`children`}):t({ref:{deployment:e}})}function R(e){return t=>t.includeAncestors(e)}function z(e){let t={$expr:e._type===`deployment`?L:k,autoLayout(t,n){return e.rules.push(S({direction:t,rankSep:n?.rank,nodeSep:n?.node})),this},exclude(...t){return e.rules.push({exclude:t}),this},include(...t){return e.rules.push({include:t}),this},style(t){return e.rules.push(t),this},get Expr(){throw Error(`Expr is not available in runtime`)},get Types(){throw Error(`Types are not available in runtime`)},get ElementExpr(){throw Error(`ElementExpr is not available in runtime`)},get TypedExpr(){throw Error(`TypedExpr is not available in runtime`)}};return e._type===`deployment`?Object.assign(t,{includeAncestors(t){return e.rules.push({includeAncestors:t}),this}}):t}function B(e){return t(e)?s(e,e=>({})):e}function V({tags:e,elements:t,deployments:n,relationships:r,...i}){let a={};e&&Object.assign(a,B(e));let o=B(t);for(let[e,t]of l(o))if(t.tags)for(let n of t.tags)m(n in a,`Invalid specification for element kind "${e}": tag "${n}" not found`);let s=B(n??{});for(let[e,t]of l(s))if(t.tags)for(let n of t.tags)m(n in a,`Invalid specification for deployment kind "${e}": tag "${n}" not found`);return{...i,tags:a,elements:o,deployments:s,relationships:B(r??{})}}function H(e){return i(e)?null:typeof e==`string`?{txt:e}:e}function U(t,s=new Map,l=[],f=new Map,g={predicates:{},dynamicPredicates:{},styles:{}},k=new Map,j=[],L=new D.default(()=>new Map)){let B=V(t),W=()=>({elements:structuredClone(B.elements),deployments:structuredClone(B.deployments),relationships:structuredClone(B.relationships),tags:A(structuredClone(B.tags)),...B.metadataKeys?{metadataKeys:B.metadataKeys}:{},customColors:{}}),G=e=>{if(!(!e||!a(e,1)))return o(e,e=>typeof e==`string`?{url:e}:e)},K=(e,t,n)=>{r(t)&&(n=t,t={}),t??={};let{links:i=[],title:a=null,description:o=null,tags:s=[],...c}=typeof t==`string`?{title:t}:{...t},l=G(i);return[S({id:e,title:a,description:H(o),tags:s,links:l,_stage:`parsed`,...c}),n]},q=e=>{let[t,n]=C(e),r=(t?L.get(t):s).get(n);return m(r,`Element with id "${e}" not found`),r},J=e=>{if(typeof e==`string`){let[t,n]=C(e);return t?{project:t,model:n}:{model:n}}return`project`in e||`deployment`in e?e:J(e.model)},Y={get Types(){throw Error(`Types are not available in runtime`)},clone:()=>{let e=new D.default(()=>new Map);for(let[t,n]of L)e.set(t,structuredClone(n));return U(structuredClone(B),structuredClone(s),structuredClone(l),structuredClone(f),structuredClone(g),structuredClone(k),structuredClone(j),e)},__addElement:e=>{let[t,n]=C(e.id),r=b(n),i=t?L.get(t):s;if(r&&m(i.get(r),`Parent element with id "${r}" not found for element with id "${e.id}"`),i.has(n))throw Error(`Element with id "${e.id}" already exists`);return i.set(n,t?{...e,id:n}:e),Y},__addRelation(e){let t=J(e.source),n=_.flatten(t),r=J(e.target),i=_.flatten(r),a=q(n),o=q(i);if(T(n)&&T(i))throw Error(`Cannot create relationship between global elements`);return!T(n)&&!T(i)&&m(!w(a,o),`Cannot create relationship between elements in the same hierarchy`),l.push({id:`rel${l.length+1}`,...e,source:t,target:r}),Y},__fqn(e){return m(e.trim()!==``,`Id must be non-empty`),e},__deploymentFqn(e){return m(e.trim()!==``,`Id must be non-empty`),e},__addSourcelessRelation(){throw Error(`Can be called only in nested model`)},__addView:e=>{if(f.has(e.id))throw Error(`View with id "${e.id}" already exists`);return x(e)&&`viewOf`in e&&m(s.get(e.viewOf),`Invalid scoped view ${e.id}, wlement with id "${e.viewOf}" not found`),f.set(e.id,e),Y},__addDeployment:e=>{if(k.has(e.id))throw Error(`Deployment with id "${e.id}" already exists`);let t=b(e.id);return t&&m(k.get(t),`Parent element with id "${t}" not found for node with id "${e.id}"`),h(e)&&(m(t,`Instance ${e.id} of ${e.element} must be deployed under a parent node`),m(s.get(e.element),`Instance "${e.id}" references non-existing element "${e.element}"`)),k.set(e.id,e),Y},__addDeploymentRelation:e=>(m(!w(e.source.deployment,e.target.deployment),`Cannot create relationship between elements in the same hierarchy`),m(k.has(e.source.deployment),`Relation "${e.source.deployment} -> ${e.target.deployment}" references non-existing source`),m(k.has(e.target.deployment),`Relation "${e.source.deployment} -> ${e.target.deployment}" references non-existing target`),j.push({id:`deploy_rel${j.length+1}`,...e}),Y),build:e=>({[v]:`parsed`,projectId:typeof e==`string`?e:e?.id??`from-builder`,project:{id:typeof e==`string`?e:`from-builder`,...typeof e==`object`&&e?e:{}},specification:W(),elements:c(structuredClone(Array.from(s.entries()))),relations:p(l,e=>[e.id,structuredClone(e)]),globals:structuredClone(g),deployments:{elements:c(structuredClone(Array.from(k.entries()))),relations:p(j,e=>[e.id,structuredClone(e)])},views:c(structuredClone(Array.from(f.entries()))),imports:d(Array.from(L.entries()),o(([e,t])=>[e,structuredClone([...t.values()])]),u(([e,t])=>t.length>0),c())}),toLikeC4Model:e=>O(Y.build(e)),helpers:()=>({model:{model:(...e)=>t=>e.reduce((e,t)=>t(e),t),rel:(t,n,r)=>i=>{let{title:a=``,links:o=[],description:s=null,notes:c=null,...l}=e(typeof r==`string`?{title:r}:{...r},{title:null,links:null}),u=G(o);return i.__addRelation(S({source:{model:t},target:{model:n},title:a,...s&&{description:H(s)},...c&&{notes:H(c)},links:u,...l})),i},relTo:(t,n)=>r=>{let{title:i=``,links:a,description:o=null,notes:s=null,...c}=e(typeof n==`string`?{title:n}:{...n},{title:null,links:null});return r.__addSourcelessRelation(S({target:{model:t},title:i,...o&&{description:H(o)},...s&&{notes:H(s)},links:G(a),...c})),r},...n(B.elements,({style:e,...t},n)=>(r,i)=>{let a=(a=>{let{links:o,icon:s,color:c,shape:l,style:u,title:d,description:f,summary:p,...m}=typeof i==`string`?{title:i}:{...i},h=s??e?.icon,g=G(o),_=a.__fqn(r);return a.__addElement(S({id:_,kind:n,...t,title:d??t.title??y(_),...f&&{description:H(f)},...p&&{summary:H(p)},style:S({icon:h,color:c??e?.color,shape:l??e?.shape,border:e?.border,opacity:e?.opacity,size:e?.size,padding:e?.padding,textSize:e?.textSize,...u}),...g&&{links:g},...m})),a});return a.with=(...e)=>t=>{a(t);let{__fqn:n,__addSourcelessRelation:i}=t;try{t.__fqn=e=>`${n(r)}.${e}`,t.__addSourcelessRelation=e=>t.__addRelation({...e,source:{model:n(r)}}),e.reduce((e,t)=>t(e),t)}finally{t.__fqn=n,t.__addSourcelessRelation=i}return t},a})},views:{views:(...e)=>t=>e.reduce((e,t)=>t(e),t),view:(e,t,n)=>{let[r,i]=K(e,t,n),a={...r,[E]:`element`,rules:[]},o=e=>(e.__addView(a),i&&i(z(a)),e);return o.with=(...e)=>t=>{o(t);let n=z(a);for(let t of e)t(n);return t},o},viewOf:(e,t,n,r)=>{let[i,a]=K(e,n,r),o={...i,viewOf:t,[E]:`element`,rules:[]},s=e=>(e.__addView(o),a&&a(z(o)),e);return s.with=(...e)=>t=>{s(t);let n=z(o);for(let t of e)t(n);return t},s},deploymentView:(e,t,n)=>{let[r,i]=K(e,t,n),a={...r,[E]:`deployment`,rules:[]},o=e=>(e.__addView(a),i&&i(z(a)),e);return o.with=(...e)=>t=>{o(t);let n=z(a);for(let t of e)t(n);return t},o},$autoLayout:F,$exclude:N,$include:M,$rules:I,$style:P,$includeAncestors:R},deployment:{deployment:(...e)=>t=>e.reduce((e,t)=>t(e),t),instanceOf:(e,t,n)=>r=>{i(t)?(t=e,e=y(e)):typeof t==`string`?n??={}:(n=t,t=e,e=y(e));let{links:a,title:o,description:s,summary:c,icon:l,color:u,shape:d,style:f,...p}=typeof n==`string`?{title:n}:{...n},m=r.__deploymentFqn(e);return r.__addDeployment(S({id:m,element:t,...o&&{title:o},...c&&{summary:H(c)},...s&&{description:H(s)},style:S({icon:l,color:u,shape:d,...f}),links:G(a),...p})),r},rel:(e,t,n)=>r=>{let{title:i=null,links:a,description:o=null,notes:s=null,...c}=typeof n==`string`?{title:n}:{...n};return r.__addDeploymentRelation(S({source:{deployment:e},target:{deployment:t},title:i,...o&&{description:H(o)},...s&&{notes:H(s)},links:G(a),...c})),r},...n(B.deployments??{},({style:e,...t},n)=>(r,i)=>{let a=(a=>{let{links:o,icon:s,style:c,title:l,description:u,summary:d,color:f,shape:p,...m}=typeof i==`string`?{title:i}:{...i},h=s??e?.icon,g=G(o),_=a.__deploymentFqn(r);return a.__addDeployment(S({id:_,kind:n,...t,title:l??t.title??y(_),...u&&{description:H(u)},...d&&{summary:H(d)},style:S({icon:h,color:f??e?.color,shape:p??e?.shape,border:e?.border,opacity:e?.opacity,size:e?.size,padding:e?.padding,textSize:e?.textSize,...c}),...g&&{links:g},...m})),a});return a.with=(...e)=>t=>{a(t);let{__deploymentFqn:n}=t;try{t.__deploymentFqn=e=>`${n(r)}.${e}`,e.reduce((e,t)=>t(e),t)}finally{t.__deploymentFqn=n}return t},a})}}),with:(...e)=>{let t=Y.clone();return e.reduce((e,t)=>t(e),t)},model:e=>{let t=Y.clone(),n=t.helpers().model,r=n.model;return e({...n,_:r},r)(t)},deployment:e=>{let t=Y.clone(),n=t.helpers().deployment,r=n.deployment;return e({...n,_:r},r)(t)},views:e=>{let t=Y.clone(),n=t.helpers().views;return e({...n,_:n.views},n.views)(t)}};return Y}const W={forSpecification(e){let t=U(e);return{...t.helpers(),builder:t}},specification(e){return U(e)}};export{W as Builder};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Hr as ElementId, Ir as AnyParsed, Nr as Any, On as ModelExpression, S as ComputedView, Xi as _stage, Zi as _type, _ as ComputedLikeC4ModelData, b as ParsedLikeC4ModelData, cn as AnyExcludePredicate, gn as ViewAutoLayout, hi as toComputed, it as ComputedEdge, ln as AnyIncludePredicate, oa as NonEmptyArray, oi as Unknown, ot as ComputedNode, pn as BaseViewProperties, ui as ViewId, w as ParsedView } from "../_chunks/index.mjs";
|
|
2
2
|
import { C as ElementModel, T as RelationshipModel, n as LikeC4Model } from "../_chunks/LikeC4Model.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { V as ViewPredicate } from "../_chunks/_types.mjs";
|
|
4
4
|
import "../_chunks/index4.mjs";
|
|
5
5
|
import { a as LayoutedProjectNode, i as LayoutedProjectEdge, n as ComputedProjectNode, o as LayoutedProjectsView, r as ComputedProjectsView, t as ComputedProjectEdge } from "../_chunks/_types2.mjs";
|
|
6
6
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{$ as e,C as t,D as n,K as r,L as i,Q as a,S as o,T as s,X as c,Y as l,b as u,d,et as f,i as p,m,r as h,w as g,y as _}from"../_chunks/libs/remeda.mjs";import{$ as v
|
|
2
|
-
`)},shape:`rectangle`,children:[],inEdges:[],outEdges:[],color:`primary`,level:0,style:{},tags:[]};t.set(r.id,r)}return t}function X(t){let n=O([...t]),r=new Set(n),i=new Map,a=new N.default(()=>null),o=n.reduce((t,n,o,s)=>(i.set(n.id,n),t.set(n.id,f(s,e(o+1),l(
|
|
1
|
+
import{$ as e,C as t,D as n,K as r,L as i,Q as a,S as o,T as s,X as c,Y as l,b as u,d,et as f,i as p,m,r as h,w as g,y as _}from"../_chunks/libs/remeda.mjs";import{$ as v,$t as y,Bt as ee,Cn as b,On as x,Sn as S,Tt as C,Ut as w,Yt as T,_ as E,_t as D,cn as te,g as ne,hn as O,it as re,ln as k,st as A,vt as j,zt as M}from"../_chunks/types.mjs";import{t as N}from"../_chunks/libs/mnemonist.mjs";import"../_chunks/model.mjs";import{a as P,c as F,i as I,n as L,o as R,r as z,s as B,t as V}from"../_chunks/Builder.view-element.mjs";import{t as H}from"../_chunks/libs/graphology.mjs";import{n as U,t as W}from"../utils/graphology/index.mjs";function G(e){let t=new H({type:`directed`}),n=[];for(let r of h(e))t.addNode(r.id,{view:r}),E(r)&&n.push(r);if(n.length===0)return e;for(let e of n){if(!t.hasNode(e.extends)){console.warn(`View "${e.id}" extends from "${e.extends}" which does not exist`);continue}if((0,U.default)(t,e.id,e.extends)){console.warn(`View "${e.id}" extends from "${e.extends}" which creates a cycle`);continue}t.addDirectedEdge(e.id,e.extends)}return(0,W.topologicalSort)(t).reverse().reduce((e,n)=>{let r=t.getNodeAttribute(n,`view`);if(!E(r))return e[r.id]=r,e;let i=e[r.extends];if(!i||!ne(i))return e;let a=p([...i.tags??[],...r.tags??[]]),o=[...i.links??[],...r.links??[]];return e[r.id]={...i,...r,title:r.title??i.title??null,description:r.description??i.description??null,tags:a,links:y(o)?o:null,rules:[...i.rules,...r.rules]},e},{})}function K({edges:e,nodes:t,...n},r=`:`){let i=g(e,e=>[e.id,`${e.source}${r}${e.target}`]);return{...n,edges:e.map(e=>({...e,id:i[e.id]})),nodes:t.map(e=>({...e,inEdges:s(e.inEdges,e=>i[e]),outEdges:s(e.outEdges,e=>i[e])})),nodeIds:t.map(e=>e.id),edgeIds:e.map(e=>i[e.id])}}function q({views:e,...n}){return{...n,views:t(e,e=>o(K(e),[`nodeIds`,`edgeIds`]))}}const J=e=>n(e).length,Y=e=>C(e);function ie(e){let t=ae(e),n=(e,t)=>`${e}->${t}`,o=new N.default(e=>{let[t,n]=e.split(`->`);return{from:t,to:n,relationships:new Set}}),l=(e,t)=>o.get(n(e,t)).relationships,u=(e,t)=>{let n=t.projectId;S(n!==e.projectId,`Imported element must have a different project id`);let r=l(e.projectId,n);for(let n of t.incoming(`direct`))n.source.projectId===e.projectId&&r.add(n);let i=l(n,e.projectId);for(let n of t.outgoing(`direct`))n.target.projectId===e.projectId&&i.add(n)};for(let t of e)if(!i(t.$data.imports))for(let[e,n]of c(t.$data.imports))for(let r of n){let n=v(e,r.id);u(t,b(t.findElement(n),`Element ${r.id} from project ${e} not found in model ${t.projectId}`))}let d=Array.from(o.entries()).filter(([e,{relationships:t}])=>t.size>0).map(([e,{from:t,to:n,relationships:i}])=>{let o=[...i];S(a(o,1),`Relationships set must have at least one relationship`);let c={id:C(e),source:Y(t),target:Y(n),projectId:t,relations:s(o,m(`id`)),label:null,color:`gray`,parent:null,line:`solid`,tags:p(r(o,m(`tags`)))},l=_(o);return l&&(c.label=l.title,c.description=x(l.$relationship)??null,c.technology=l.technology,c.color=l.color,c.line=l.line,l.kind&&(c.kind=l.kind),l.$relationship.navigateTo&&(c.navigateTo=l.$relationship.navigateTo)),c});F(t,d);let f=B({nodes:t,edges:d});return{id:`projects-view`,[j]:`projects`,[D]:`computed`,title:`Projects`,description:{txt:`Overview of all projects and their relationships`},autoLayout:{direction:`TB`},...f}}function ae(e){let t=new Map;for(let n of e){let e=re(n.projectId),r={id:Y(e),kind:`@project`,parent:null,projectId:e,title:n.project.title??n.project.id,description:{txt:[`Elements: ${J(n.$data.elements)}`,`Relationships: ${J(n.$data.relations)}`,`Views: ${J(n.$data.views)}`].join(`
|
|
2
|
+
`)},shape:`rectangle`,children:[],inEdges:[],outEdges:[],color:`primary`,level:0,style:{},tags:[]};t.set(r.id,r)}return t}function X(t){let n=O([...t]),r=new Set(n),i=new Map,a=new N.default(()=>null),o=n.reduce((t,n,o,s)=>(i.set(n.id,n),t.set(n.id,f(s,e(o+1),l(k(n)),d((e,t)=>(r.delete(t),e.some(te(t))||(e.push(t),a.set(t.id,n)),e),[]))),t),new N.default(()=>[]));return{sorted:n,byId:e=>b(i.get(e),`Element not found by id: ${e}`),root:r,parent:e=>a.get(typeof e==`string`?e:e.id),children:e=>o.get(typeof e==`string`?e:e.id),flatten:u(()=>new Set([...r,...n.reduce((e,t)=>{let n=o.get(t.id);return n.length===0?(e.push(t),e):(n.length>1&&e.push(...n),e)},[])]))}}const Z=(e,t)=>e.size>2&&t.size!==e.size?new Set(O([...X(e).flatten(),...t])):e.size>1?new Set(O([...e])):e;function Q(e,t,n){let r=e=>t.has(e),i=new Set([e]),a={incomers:new Set,subjects:new Set([e]),outgoers:new Set},o=new Set(n.incoming.flatMap(t=>{if(a.subjects.add(t.target),a.incomers.add(t.source),i.add(t.target),t.target!==e){let n=t.target.parent;for(;n&&n!==e;)i.add(n),n=n.parent}let n=t.source,o=[];for(;o.push(n),!(r(n)||!n.parent);)n=n.parent;return o})),s=new Set(n.outgoing.flatMap(t=>{if(a.subjects.add(t.source),a.outgoers.add(t.target),i.add(t.source),t.source!==e){let n=t.source.parent;for(;n&&n!==e;)i.add(n),n=n.parent}let n=t.target,o=[];for(;o.push(n),!(r(n)||!n.parent);)n=n.parent;return o}));return{incomers:Z(o,a.incomers),incoming:new Set(n.incoming),subjects:Z(i,a.subjects),outgoing:new Set(n.outgoing),outgoers:Z(s,a.outgoers)}}function oe(e,t,n,r=`global`){let i=n?t.findView(n):null;if(r===`view`)return S(i,`Scope view id is required when scope is "view"`),se(e,i,t);let a=t.element(e);return Q(a,ee(a.ascendingSiblings()),{incoming:[...a.incoming()],outgoing:[...a.outgoing()]})}function se(e,t,n){let r=n.element(e),i={incoming:M(T(r.incoming(),e=>t.includesRelation(e.id))),outgoing:M(T(r.outgoing(),e=>t.includesRelation(e.id)))},a=k(r);return Q(r,new Set([...r.ascendingSiblings(),...f(t.elements(),w(e=>e.element),T(e=>e!==r&&a(e)))]),i)}function $(e,t){return{...R(e,{id:A(`adhoc`),_stage:`parsed`,_type:`element`,rules:t,title:null,description:null}),_type:`adhoc`,_stage:`computed`}}var ce=class e{model;static use(t){return new e(t)}#e=[];constructor(e){this.model=e}Expr;include(...e){return this.#e.push({include:e.map(e=>V(e))}),this}exclude(...e){return this.#e.push({exclude:e.map(e=>V(e))}),this}compute(){return $(this.model,this.#e)}};export{ce as AdhocView,$ as computeAdhocView,L as computeLikeC4Model,z as computeParsedModelData,ie as computeProjectsView,oe as computeRelationshipsView,I as computeView,G as resolveRulesExtendedViews,X as treeFromElements,P as unsafeComputeView,q as viewsWithReadableEdges,K as withReadableEdges};
|
package/dist/geometry/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{En as e,Tn as t,bn as n,bt as r,xn as i,xt as a}from"../_chunks/types.mjs";export{n as BBox,i as RectBox,r as Vector,t as convertPoint,e as isPoint,a as vector};
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as DiagramNodeDriftReason, $i as Coalesce, $n as isTagEqual, $t as ElementViewIncludePredicate, A as isComputedView, Ai as ProjectId, An as ModelRelationExpr, Ar as IconPositions, At as ElementStyle, B as DeploymentViewIncludePredicate, Bi as flattenMarkdownOrString, Bn as NotOperator, Bt as DynamicStep, C as LayoutedView, Ci as GlobalFqn, Cn as ViewWithNotation, Cr as ThemeColor, Ct as DeploymentNode, D as ViewRule, Di as MarkdownOrString, Dn as isViewRuleGlobalStyle, Dr as BorderStyles, Dt as isDeploymentNode, E as ViewOnStage, Ei as IconUrl, En as isViewRuleGlobalPredicateRef, Er as isThemeColor, Et as isDeployedInstance, F as isExtendsElementView, Fi as StepEdgeIdLiteral, Fn as AndOperator, Fr as AnyLayouted, Ft as GlobalPredicateId, G as ParsedViewRuleAncestors, Gi as splitGlobalFqn, Gn as TagEqual, Gt as DynamicViewRule, H as DeploymentViewRule, Hi as isGroupElementKind, Hn as OrOperator, Ht as DynamicStepsSeries, I as isScopedElementView, Ii as StepEdgeKind, In as EqualOperator, Ir as AnyParsed, It as GlobalPredicates, J as LayoutType, Ji as ModelStage, Jn as isKindEqual, Jt as getParallelStepsPrefix, K as DiagramEdge, Ki as stepEdgeId, Kn as WhereOperator, Kt as DynamicViewStep, L as isViewRulePredicate, Li as Tag, Ln as Filterable, Lr as Aux, Lt as GlobalStyleID, M as isDiagramView, Mi as RelationKind, Mn as FqnExpr, Mr as ThemeColors, Mt as Relationship, N as isDynamicView, Ni as RelationshipKind, Nn as PredicateSelector, Nr as Any, Nt as ensureSizes, O as ViewRulePredicate, Oi as NodeId, On as ModelExpression, Ot as AbstractRelationship, P as isElementView, Pi as StepEdgeId, Pn as RelationExpr, Pr as AnyComputed, Pt as GlobalDynamicPredicates, Q as DiagramEdgeDriftReason, Qi as isOnStage, Qn as isParticipantOperator, Qt as ElementViewExcludePredicate, R as isViewRuleStyle, Ri as ViewId, Rn as KindEqual, Rt as GlobalStyles, S as ComputedView, Si as Fqn, Sn as ViewWithHash, Sr as TextSize, St as DeploymentElementRef, T as ProcessedView, Ti as Icon, Tn as isViewRuleAutoLayout, Tr as isCustomColor, Tt as DeploymentRelationship, U as DeploymentViewRuleStyle, Ui as isStepEdgeId, Un as Participant, Ut as DynamicViewDisplayVariant, V as DeploymentViewPredicate, Vi as isGlobalFqn, Vn as OperatorPredicate, Vt as DynamicStepsParallel, W as ParsedDeploymentView, Wi as scalar_d_exports, Wn as ParticipantOperator, Wt as DynamicViewIncludeRule, X as LayoutedDynamicView, Xi as _stage, Xn as isNotOperator, Xt as isDynamicStepsParallel, Y as LayoutedDeploymentView, Yi as _layout, Yn as isMetadataEqual, Yt as isDynamicStep, Z as LayoutedElementView, Zi as _type, Zn as isOrOperator, Zt as isDynamicStepsSeries, _ as ComputedLikeC4ModelData, _i as BuiltInIcon, _n as ViewRuleAutoLayout, _r as RelationshipColorValues, _t as Specification, a as isNonEmptyArray, aa as NTuple, an as ParsedElementView, ar as CustomColor, at as ComputedElementView, b as ParsedLikeC4ModelData, bi as EdgeId, bn as ViewRuleRank, br as Size, bt as DeployedInstance, c as RichTextEmpty, ca as Predicate, ci as UnknownLayouted, cn as AnyExcludePredicate, cr as ElementShape, ct as ComputedRankConstraint, d as AuxFromDump, di as _aux_d_exports, dn as AutoLayoutDirection, dr as IconSize, dt as LikeC4ProjectStyleDefaults, ea as ExclusiveUnion, en as ElementViewPredicate, er as whereOperatorAsPredicate, et as LayoutedViewDriftReason, f as LikeC4ModelDump, fi as preferDescription, fn as BaseParsedViewProperties, fr as LikeC4StyleDefaults, ft as LikeC4ProjectStylesConfig, g as AuxFromLikeC4ModelData, gi as AnyFqn, gn as ViewAutoLayout, gr as RelationshipArrowTypes, gt as RelationshipSpecification, h as SpecificationDump, hn as RankValue, hr as RelationshipArrowType, ht as ElementSpecification, i as isAnyOf, ia as Link, in as ElementViewRuleStyle, ir as ColorLiteral, it as ComputedEdge, j as isDeploymentView, ji as RelationId, jn as Expression, jr as Sizes, jt as ModelRelation, k as ViewWithType, ki as NoneIcon, kn as ModelFqnExpr, kr as ElementShapes, kt as Element, l as RichTextOrEmpty, la as ReorderedArray, li as UnknownParsed, ln as AnyIncludePredicate, lr as HexColor, lt as LikeC4Project, m as SpecTypesFromDump, mn as NodeNotation, mr as LikeC4Theme, mt as LikeC4ProjectTheme, n as GuardedBy, na as IteratorLike, nn as ElementViewRuleGroup, nr as BorderStyle, nt as ComputedDeploymentView, o as isString, oa as NonEmptyArray, oi as Unknown, on as isViewRuleGroup, or as CustomColorDefinitions, ot as ComputedNode, p as ProjectDump, pi as preferSummary, pn as BaseViewProperties, pr as LikeC4StylesConfig, pt as LikeC4ProjectStylesCustomStylesheets, q as DiagramNode, qi as ExtractOnStage, qn as isAndOperator, qr as LooseLiteral, qt as ParsedDynamicView, r as hasProp, ra as KeysOf, rn as ElementViewRuleRank, rr as Color, rt as ComputedDynamicView, s as RichText, sa as NonEmptyReadonlyArray, si as UnknownComputed, sn as isViewRuleRank, sr as ElementColorValues, st as ComputedNodeStyle, t as Guard, ta as IterableContainer, ti as SpecAux, tn as ElementViewRule, tr as FqnRef, tt as ViewManualLayoutSnapshot, u as ViewChange, ua as exact, un as AnyViewRuleStyle, ur as IconPosition, ut as LikeC4ProjectManualLayoutsConfig, v as LayoutedLikeC4ModelData, vi as DeploymentFqn, vn as ViewRuleGlobalPredicateRef, vr as RelationshipLineType, vt as TagSpecification, w as ParsedView, wi as GroupElementKind, wn as isAutoLayoutDirection, wr as ThemeColorValues, wt as DeploymentRelation, x as AnyView, xi as ElementKind, xn as ViewType, xr as SpacingSize, xt as DeploymentElement, y as LikeC4ModelData, yi as DeploymentKind, yn as ViewRuleGlobalStyle, yr as ShapeSize, yt as isTagColorSpecified, z as DeploymentViewExcludePredicate, zi as extractStep, zn as MetadataEqual, zt as ModelGlobals } from "./_chunks/index.mjs";
|
|
2
2
|
import { a as RectBox, c as XYPoint, i as BBox, l as convertPoint, n as VectorValue, o as Dimensions, r as vector, s as Point, t as Vector, u as isPoint } from "./_chunks/index2.mjs";
|
|
3
3
|
import { i as LikeC4Styles } from "./_chunks/index3.mjs";
|
|
4
|
-
import { a as DefaultWeakMap, i as LinkedList, n as
|
|
4
|
+
import { a as DefaultWeakMap, i as LinkedList, n as Queue, o as DefaultMap, r as MultiMap } from "./_chunks/libs/mnemonist.mjs";
|
|
5
5
|
import { o as LayoutedProjectsView, r as ComputedProjectsView } from "./_chunks/_types2.mjs";
|
|
6
|
-
import {
|
|
6
|
+
import { A as ancestorsFqn, B as parentFqn, H as sortNaturalByFqn, I as isAncestor, J as invariant, L as isDescendantOf, O as isIterable, R as isSameHierarchy, U as sortParentsFirst, X as nonexhaustive, Y as nonNullable, h as memoizeProp, z as nameFromFqn } from "./_chunks/index5.mjs";
|
|
7
7
|
|
|
8
8
|
//#region src/manual-layout/applyCachedLayout.d.ts
|
|
9
9
|
/**
|
|
@@ -33,4 +33,4 @@ declare function applyManualLayout<V extends LayoutedView>(autoLayouted: V, snap
|
|
|
33
33
|
*/
|
|
34
34
|
declare function calcDriftsFromSnapshot<V extends LayoutedView>(autoLayouted: V, snapshot: ViewManualLayoutSnapshot): V;
|
|
35
35
|
//#endregion
|
|
36
|
-
export { AbstractRelationship, AndOperator, Any, Any as AnyAux, AnyComputed, AnyExcludePredicate, AnyFqn, AnyIncludePredicate, AnyLayouted, AnyParsed, AnyView, AnyViewRuleStyle, AutoLayoutDirection, Aux, AuxFromDump, AuxFromLikeC4ModelData, BBox, BaseParsedViewProperties, BaseViewProperties, BorderStyle, BorderStyles, BuiltInIcon, Coalesce, Color, ColorLiteral, ComputedDeploymentView, ComputedDynamicView, ComputedEdge, ComputedElementView, ComputedLikeC4ModelData, ComputedNode, ComputedNodeStyle, type ComputedProjectsView, ComputedRankConstraint, ComputedView, CustomColor, CustomColorDefinitions, DefaultMap, DefaultWeakMap, DeployedInstance, DeploymentElement, DeploymentElementRef, DeploymentFqn, DeploymentKind, DeploymentNode, DeploymentRelation, DeploymentRelationship, DeploymentViewExcludePredicate, DeploymentViewIncludePredicate, DeploymentViewPredicate, DeploymentViewRule, DeploymentViewRuleStyle, DiagramEdge, DiagramEdgeDriftReason, DiagramNode, DiagramNodeDriftReason, LayoutedView as DiagramView, LayoutedView, Dimensions, DynamicStep, DynamicStepsParallel, DynamicStepsSeries, DynamicViewDisplayVariant, DynamicViewIncludeRule, DynamicViewRule, DynamicViewStep, EdgeId, Element, ElementColorValues, ElementKind, ElementShape, ElementShapes, ElementSpecification, ElementStyle, ElementViewExcludePredicate, ElementViewIncludePredicate, ElementViewPredicate, ElementViewRule, ElementViewRuleGroup, ElementViewRuleRank, ElementViewRuleStyle, EqualOperator, ExclusiveUnion, Expression, ExtractOnStage, Filterable, Fqn, FqnExpr, FqnRef, GlobalDynamicPredicates, GlobalFqn, GlobalPredicateId, GlobalPredicates, GlobalStyleID, GlobalStyles, GroupElementKind, Guard, GuardedBy, HexColor, Icon, IconPosition, IconPositions, IconSize, IconUrl, IterableContainer, IteratorLike, KeysOf, KindEqual, LayoutType, LayoutedDeploymentView, LayoutedDynamicView, LayoutedElementView, LayoutedLikeC4ModelData, type LayoutedProjectsView, LayoutedViewDriftReason, LikeC4ModelData, LikeC4ModelDump, LikeC4Project, LikeC4ProjectManualLayoutsConfig, LikeC4ProjectStyleDefaults, LikeC4ProjectStylesConfig, LikeC4ProjectStylesCustomStylesheets, LikeC4ProjectTheme, type LikeC4StyleDefaults, LikeC4Styles, type LikeC4StylesConfig, type LikeC4Theme, ParsedView as LikeC4View, ParsedView, Link, LinkedList, LooseLiteral, MarkdownOrString, MetadataEqual, ModelExpression, ModelFqnExpr, ModelGlobals, ModelRelation, ModelRelationExpr, ModelStage, MultiMap, NTuple, NodeId, NodeNotation, NonEmptyArray, NonEmptyReadonlyArray, NoneIcon, NotOperator, OperatorPredicate, OrOperator, ParsedDeploymentView, ParsedDynamicView, ParsedElementView, ParsedLikeC4ModelData, Participant, ParticipantOperator, Point, Predicate, PredicateSelector, ProcessedView, ProjectDump, ProjectId, Queue, RankValue, RectBox, RelationExpr, RelationId, RelationKind, Relationship, RelationshipArrowType, RelationshipArrowTypes, RelationshipColorValues, RelationshipKind, RelationshipLineType, RelationshipSpecification, ReorderedArray, RichText, RichTextEmpty, RichTextOrEmpty, ShapeSize, Size, Sizes, SpacingSize, SpecAux, SpecTypesFromDump, Specification, SpecificationDump, StepEdgeId, StepEdgeIdLiteral, StepEdgeKind, Tag, TagEqual, TagSpecification, TextSize, ThemeColor, type ThemeColorValues, ThemeColors, Unknown, UnknownComputed, UnknownLayouted, UnknownParsed, Vector, VectorValue, ViewAutoLayout, ViewChange, ViewId, ViewManualLayoutSnapshot, ViewOnStage, ViewRule, ViewRuleAutoLayout, ViewRuleGlobalPredicateRef, ViewRuleGlobalStyle, ViewRulePredicate, ViewRuleRank, ViewType, ViewWithHash, ViewWithNotation, ViewWithType, WhereOperator, XYPoint, _layout, _stage, _type, ancestorsFqn, applyCachedLayout, applyManualLayout, _aux_d_exports as aux, calcDriftsFromSnapshot, convertPoint, ensureSizes, exact, extractStep, flattenMarkdownOrString, getParallelStepsPrefix, hasProp, invariant, isAncestor, isAndOperator, isAnyOf, isAutoLayoutDirection, isComputedView, isCustomColor, isDeployedInstance, isDeploymentNode, isDeploymentView, isDescendantOf, isDiagramView, isDiagramView as isLayoutedView, isDynamicStep, isDynamicStepsParallel, isDynamicStepsSeries, isDynamicView, isElementView, isExtendsElementView, isGlobalFqn, isGroupElementKind, isIterable, isKindEqual, isMetadataEqual, isNonEmptyArray, isNotOperator, isOnStage, isOrOperator, isParticipantOperator, isPoint, isSameHierarchy, isScopedElementView, isStepEdgeId, isString, isTagColorSpecified, isTagEqual, isThemeColor, isViewRuleAutoLayout, isViewRuleGlobalPredicateRef, isViewRuleGlobalStyle, isViewRuleGroup, isViewRulePredicate, isViewRuleRank, isViewRuleStyle, memoizeProp, nameFromFqn, nonNullable, nonexhaustive, parentFqn, preferDescription, preferSummary, scalar_d_exports as scalar, sortNaturalByFqn, sortParentsFirst, splitGlobalFqn, stepEdgeId, vector, whereOperatorAsPredicate };
|
|
36
|
+
export { AbstractRelationship, AndOperator, Any, Any as AnyAux, AnyComputed, AnyExcludePredicate, AnyFqn, AnyIncludePredicate, AnyLayouted, AnyParsed, AnyView, AnyViewRuleStyle, AutoLayoutDirection, Aux, AuxFromDump, AuxFromLikeC4ModelData, BBox, BaseParsedViewProperties, BaseViewProperties, BorderStyle, BorderStyles, BuiltInIcon, Coalesce, Color, ColorLiteral, ComputedDeploymentView, ComputedDynamicView, ComputedEdge, ComputedElementView, ComputedLikeC4ModelData, ComputedNode, ComputedNodeStyle, type ComputedProjectsView, ComputedRankConstraint, ComputedView, CustomColor, CustomColorDefinitions, DefaultMap, DefaultWeakMap, DeployedInstance, DeploymentElement, DeploymentElementRef, DeploymentFqn, DeploymentKind, DeploymentNode, DeploymentRelation, DeploymentRelationship, DeploymentViewExcludePredicate, DeploymentViewIncludePredicate, DeploymentViewPredicate, DeploymentViewRule, DeploymentViewRuleStyle, DiagramEdge, DiagramEdgeDriftReason, DiagramNode, DiagramNodeDriftReason, LayoutedView as DiagramView, LayoutedView, Dimensions, DynamicStep, DynamicStepsParallel, DynamicStepsSeries, DynamicViewDisplayVariant, DynamicViewIncludeRule, DynamicViewRule, DynamicViewStep, EdgeId, Element, ElementColorValues, ElementKind, ElementShape, ElementShapes, ElementSpecification, ElementStyle, ElementViewExcludePredicate, ElementViewIncludePredicate, ElementViewPredicate, ElementViewRule, ElementViewRuleGroup, ElementViewRuleRank, ElementViewRuleStyle, EqualOperator, ExclusiveUnion, Expression, ExtractOnStage, Filterable, Fqn, FqnExpr, FqnRef, GlobalDynamicPredicates, GlobalFqn, GlobalPredicateId, GlobalPredicates, GlobalStyleID, GlobalStyles, GroupElementKind, Guard, GuardedBy, HexColor, Icon, IconPosition, IconPositions, IconSize, IconUrl, IterableContainer, IteratorLike, KeysOf, KindEqual, LayoutType, LayoutedDeploymentView, LayoutedDynamicView, LayoutedElementView, LayoutedLikeC4ModelData, type LayoutedProjectsView, LayoutedViewDriftReason, LikeC4ModelData, LikeC4ModelDump, LikeC4Project, LikeC4ProjectManualLayoutsConfig, LikeC4ProjectStyleDefaults, LikeC4ProjectStylesConfig, LikeC4ProjectStylesCustomStylesheets, LikeC4ProjectTheme, type LikeC4StyleDefaults, LikeC4Styles, type LikeC4StylesConfig, type LikeC4Theme, ParsedView as LikeC4View, ParsedView, Link, LinkedList, LooseLiteral, MarkdownOrString, MetadataEqual, ModelExpression, ModelFqnExpr, ModelGlobals, ModelRelation, ModelRelationExpr, ModelStage, MultiMap, NTuple, NodeId, NodeNotation, NonEmptyArray, NonEmptyReadonlyArray, NoneIcon, NotOperator, OperatorPredicate, OrOperator, ParsedDeploymentView, ParsedDynamicView, ParsedElementView, ParsedLikeC4ModelData, ParsedViewRuleAncestors, Participant, ParticipantOperator, Point, Predicate, PredicateSelector, ProcessedView, ProjectDump, ProjectId, Queue, RankValue, RectBox, RelationExpr, RelationId, RelationKind, Relationship, RelationshipArrowType, RelationshipArrowTypes, RelationshipColorValues, RelationshipKind, RelationshipLineType, RelationshipSpecification, ReorderedArray, RichText, RichTextEmpty, RichTextOrEmpty, ShapeSize, Size, Sizes, SpacingSize, SpecAux, SpecTypesFromDump, Specification, SpecificationDump, StepEdgeId, StepEdgeIdLiteral, StepEdgeKind, Tag, TagEqual, TagSpecification, TextSize, ThemeColor, type ThemeColorValues, ThemeColors, Unknown, UnknownComputed, UnknownLayouted, UnknownParsed, Vector, VectorValue, ViewAutoLayout, ViewChange, ViewId, ViewManualLayoutSnapshot, ViewOnStage, ViewRule, ViewRuleAutoLayout, ViewRuleGlobalPredicateRef, ViewRuleGlobalStyle, ViewRulePredicate, ViewRuleRank, ViewType, ViewWithHash, ViewWithNotation, ViewWithType, WhereOperator, XYPoint, _layout, _stage, _type, ancestorsFqn, applyCachedLayout, applyManualLayout, _aux_d_exports as aux, calcDriftsFromSnapshot, convertPoint, ensureSizes, exact, extractStep, flattenMarkdownOrString, getParallelStepsPrefix, hasProp, invariant, isAncestor, isAndOperator, isAnyOf, isAutoLayoutDirection, isComputedView, isCustomColor, isDeployedInstance, isDeploymentNode, isDeploymentView, isDescendantOf, isDiagramView, isDiagramView as isLayoutedView, isDynamicStep, isDynamicStepsParallel, isDynamicStepsSeries, isDynamicView, isElementView, isExtendsElementView, isGlobalFqn, isGroupElementKind, isIterable, isKindEqual, isMetadataEqual, isNonEmptyArray, isNotOperator, isOnStage, isOrOperator, isParticipantOperator, isPoint, isSameHierarchy, isScopedElementView, isStepEdgeId, isString, isTagColorSpecified, isTagEqual, isThemeColor, isViewRuleAutoLayout, isViewRuleGlobalPredicateRef, isViewRuleGlobalStyle, isViewRuleGroup, isViewRulePredicate, isViewRuleRank, isViewRuleStyle, memoizeProp, nameFromFqn, nonNullable, nonexhaustive, parentFqn, preferDescription, preferSummary, scalar_d_exports as scalar, sortNaturalByFqn, sortParentsFirst, splitGlobalFqn, stepEdgeId, vector, whereOperatorAsPredicate };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,$t as t,A as ee,C as n,Cn as r,D as i,Dn as a,E as o,
|
|
1
|
+
import{$ as e,$t as t,A as ee,C as n,Cn as r,D as i,Dn as a,E as o,G as s,H as c,J as l,K as u,Lt as d,O as f,On as p,Q as m,Qt as h,S as g,Sn as _,T as v,U as y,V as b,W as x,X as S,Xt as C,Y as w,Z as T,Zt as E,_ as D,_t as O,a as k,at as A,b as j,bn as M,c as N,cn as P,ct as F,d as I,dn as L,dt as R,en as z,et as B,f as V,fn as H,ft as U,g as W,gt as G,h as K,hn as q,ht as J,i as Y,it as X,j as Z,k as Q,kn as te,l as ne,ln as re,lt as ie,m as $,mn as ae,mt as oe,n as se,nn as ce,nt as le,o as ue,ot as de,p as fe,pt as pe,q as me,r as he,rt as ge,s as _e,st as ve,t as ye,tt as be,u as xe,un as Se,ut as Ce,v as we,vt as Te,w as Ee,wn as De,x as Oe,xn as ke,y as Ae,yt as je}from"./_chunks/types.mjs";import{a as Me,n as Ne,o as Pe,r as Fe,t as Ie}from"./_chunks/libs/mnemonist.mjs";import{i as Le,n as Re,t as ze}from"./_chunks/manual-layout.mjs";import"./styles/index.mjs";var Be=Ie.default,Ve=Ne.default,He=Fe.default,Ue=Me.default,We=Pe.default;export{M as BBox,Be as DefaultMap,Ve as DefaultWeakMap,S as DeploymentFqn,T as EdgeId,u as Expression,m as Fqn,me as FqnExpr,w as FqnRef,e as GlobalFqn,B as GroupElementKind,Z as LikeC4Styles,He as LinkedList,be as MarkdownOrString,y as ModelExpression,x as ModelFqnExpr,s as ModelRelationExpr,Ue as MultiMap,le as NodeId,ge as NoneIcon,X as ProjectId,We as Queue,ke as RectBox,l as RelationExpr,A as RelationId,ye as RichText,de as StepEdgeKind,ve as ViewId,G as _layout,O as _stage,Te as _type,ce as ancestorsFqn,Le as applyCachedLayout,Re as applyManualLayout,ze as calcDriftsFromSnapshot,ee as ensureSizes,te as exact,F as extractStep,ie as flattenMarkdownOrString,Y as getParallelStepsPrefix,E as hasProp,_ as invariant,P as isAncestor,Oe as isAndOperator,h as isAnyOf,N as isAutoLayoutDirection,V as isComputedView,b as isDeployedInstance,c as isDeploymentNode,fe as isDeploymentView,re as isDescendantOf,$ as isDiagramView,$ as isLayoutedView,k as isDynamicStep,ue as isDynamicStepsParallel,_e as isDynamicStepsSeries,K as isDynamicView,W as isElementView,D as isExtendsElementView,Ce as isGlobalFqn,R as isGroupElementKind,C as isIterable,g as isKindEqual,n as isMetadataEqual,t as isNonEmptyArray,Ee as isNotOperator,je as isOnStage,v as isOrOperator,o as isParticipantOperator,Se as isSameHierarchy,we as isScopedElementView,U as isStepEdgeId,z as isString,Q as isTagColorSpecified,i as isTagEqual,ne as isViewRuleAutoLayout,xe as isViewRuleGlobalPredicateRef,I as isViewRuleGlobalStyle,se as isViewRuleGroup,Ae as isViewRulePredicate,he as isViewRuleRank,j as isViewRuleStyle,d as memoizeProp,L as nameFromFqn,r as nonNullable,De as nonexhaustive,H as parentFqn,a as preferDescription,p as preferSummary,pe as scalar,ae as sortNaturalByFqn,q as sortParentsFirst,oe as splitGlobalFqn,J as stepEdgeId,f as whereOperatorAsPredicate};
|
package/dist/styles/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Ar as
|
|
1
|
+
import { Ar as IconPositions, Cr as ThemeColor, Dr as BorderStyles, Er as isThemeColor, Mr as ThemeColors, Or as DefaultTagColors, Sr as TextSize, Tr as isCustomColor, _r as RelationshipColorValues, ar as CustomColor, br as Size, cr as ElementShape, dr as IconSize, fr as LikeC4StyleDefaults, gr as RelationshipArrowTypes, hr as RelationshipArrowType, ir as ColorLiteral, jr as Sizes, kr as ElementShapes, lr as HexColor, mr as LikeC4Theme, nr as BorderStyle, or as CustomColorDefinitions, pr as LikeC4StylesConfig, rr as Color, sr as ElementColorValues, ur as IconPosition, vr as RelationshipLineType, wr as ThemeColorValues, xr as SpacingSize, yr as ShapeSize } from "../_chunks/index.mjs";
|
|
2
2
|
import { a as assignTagColors, i as LikeC4Styles, n as styleDefaults, r as computeColorValues, t as defaultTheme } from "../_chunks/index3.mjs";
|
|
3
3
|
export { BorderStyle, BorderStyles, Color, ColorLiteral, CustomColor, CustomColorDefinitions, DefaultTagColors, ElementColorValues, ElementShape, ElementShapes, HexColor, IconPosition, IconPositions, IconSize, LikeC4StyleDefaults, LikeC4Styles, LikeC4StylesConfig, LikeC4Theme, RelationshipArrowType, RelationshipArrowTypes, RelationshipColorValues, RelationshipLineType, ShapeSize, Size, Sizes, SpacingSize, TextSize, ThemeColor, ThemeColorValues, ThemeColors, assignTagColors, computeColorValues, defaultTheme, isCustomColor, isThemeColor, styleDefaults };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as DiagramNodeDriftReason, $i as Coalesce, $n as isTagEqual, $t as ElementViewIncludePredicate, A as isComputedView, Ai as ProjectId, An as ModelRelationExpr, Ar as IconPositions, At as ElementStyle, B as DeploymentViewIncludePredicate, Bi as flattenMarkdownOrString, Bn as NotOperator, Bt as DynamicStep, C as LayoutedView, Ci as GlobalFqn, Cn as ViewWithNotation, Cr as ThemeColor, Ct as DeploymentNode, D as ViewRule, Di as MarkdownOrString, Dn as isViewRuleGlobalStyle, Dr as BorderStyles, Dt as isDeploymentNode, E as ViewOnStage, Ei as IconUrl, En as isViewRuleGlobalPredicateRef, Er as isThemeColor, Et as isDeployedInstance, F as isExtendsElementView, Fi as StepEdgeIdLiteral, Fn as AndOperator, Fr as AnyLayouted, Ft as GlobalPredicateId, G as ParsedViewRuleAncestors, Gi as splitGlobalFqn, Gn as TagEqual, Gt as DynamicViewRule, H as DeploymentViewRule, Hi as isGroupElementKind, Hn as OrOperator, Ht as DynamicStepsSeries, I as isScopedElementView, Ii as StepEdgeKind, In as EqualOperator, Ir as AnyParsed, It as GlobalPredicates, J as LayoutType, Ji as ModelStage, Jn as isKindEqual, Jt as getParallelStepsPrefix, K as DiagramEdge, Ki as stepEdgeId, Kn as WhereOperator, Kt as DynamicViewStep, L as isViewRulePredicate, Li as Tag, Ln as Filterable, Lr as Aux, Lt as GlobalStyleID, M as isDiagramView, Mi as RelationKind, Mn as FqnExpr, Mr as ThemeColors, Mt as Relationship, N as isDynamicView, Ni as RelationshipKind, Nn as PredicateSelector, Nr as Any, Nt as ensureSizes, O as ViewRulePredicate, Oi as NodeId, On as ModelExpression, Ot as AbstractRelationship, P as isElementView, Pi as StepEdgeId, Pn as RelationExpr, Pr as AnyComputed, Pt as GlobalDynamicPredicates, Q as DiagramEdgeDriftReason, Qi as isOnStage, Qn as isParticipantOperator, Qt as ElementViewExcludePredicate, R as isViewRuleStyle, Ri as ViewId, Rn as KindEqual, Rt as GlobalStyles, S as ComputedView, Si as Fqn, Sn as ViewWithHash, Sr as TextSize, St as DeploymentElementRef, T as ProcessedView, Ti as Icon, Tn as isViewRuleAutoLayout, Tr as isCustomColor, Tt as DeploymentRelationship, U as DeploymentViewRuleStyle, Ui as isStepEdgeId, Un as Participant, Ut as DynamicViewDisplayVariant, V as DeploymentViewPredicate, Vi as isGlobalFqn, Vn as OperatorPredicate, Vt as DynamicStepsParallel, W as ParsedDeploymentView, Wi as scalar_d_exports, Wn as ParticipantOperator, Wt as DynamicViewIncludeRule, X as LayoutedDynamicView, Xi as _stage, Xn as isNotOperator, Xt as isDynamicStepsParallel, Y as LayoutedDeploymentView, Yi as _layout, Yn as isMetadataEqual, Yt as isDynamicStep, Z as LayoutedElementView, Zi as _type, Zn as isOrOperator, Zt as isDynamicStepsSeries, _ as ComputedLikeC4ModelData, _i as BuiltInIcon, _n as ViewRuleAutoLayout, _r as RelationshipColorValues, _t as Specification, a as isNonEmptyArray, aa as NTuple, an as ParsedElementView, ar as CustomColor, at as ComputedElementView, b as ParsedLikeC4ModelData, bi as EdgeId, bn as ViewRuleRank, br as Size, bt as DeployedInstance, c as RichTextEmpty, ca as Predicate, ci as UnknownLayouted, cn as AnyExcludePredicate, cr as ElementShape, ct as ComputedRankConstraint, d as AuxFromDump, di as _aux_d_exports, dn as AutoLayoutDirection, dr as IconSize, dt as LikeC4ProjectStyleDefaults, ea as ExclusiveUnion, en as ElementViewPredicate, er as whereOperatorAsPredicate, et as LayoutedViewDriftReason, f as LikeC4ModelDump, fi as preferDescription, fn as BaseParsedViewProperties, fr as LikeC4StyleDefaults, ft as LikeC4ProjectStylesConfig, g as AuxFromLikeC4ModelData, gi as AnyFqn, gn as ViewAutoLayout, gr as RelationshipArrowTypes, gt as RelationshipSpecification, h as SpecificationDump, hn as RankValue, hr as RelationshipArrowType, ht as ElementSpecification, i as isAnyOf, ia as Link, in as ElementViewRuleStyle, ir as ColorLiteral, it as ComputedEdge, j as isDeploymentView, ji as RelationId, jn as Expression, jr as Sizes, jt as ModelRelation, k as ViewWithType, ki as NoneIcon, kn as ModelFqnExpr, kr as ElementShapes, kt as Element, l as RichTextOrEmpty, la as ReorderedArray, li as UnknownParsed, ln as AnyIncludePredicate, lr as HexColor, lt as LikeC4Project, m as SpecTypesFromDump, mn as NodeNotation, mr as LikeC4Theme, mt as LikeC4ProjectTheme, n as GuardedBy, na as IteratorLike, nn as ElementViewRuleGroup, nr as BorderStyle, nt as ComputedDeploymentView, o as isString, oa as NonEmptyArray, oi as Unknown, on as isViewRuleGroup, or as CustomColorDefinitions, ot as ComputedNode, p as ProjectDump, pi as preferSummary, pn as BaseViewProperties, pr as LikeC4StylesConfig, pt as LikeC4ProjectStylesCustomStylesheets, q as DiagramNode, qi as ExtractOnStage, qn as isAndOperator, qr as LooseLiteral, qt as ParsedDynamicView, r as hasProp, ra as KeysOf, rn as ElementViewRuleRank, rr as Color, rt as ComputedDynamicView, s as RichText, sa as NonEmptyReadonlyArray, si as UnknownComputed, sn as isViewRuleRank, sr as ElementColorValues, st as ComputedNodeStyle, t as Guard, ta as IterableContainer, ti as SpecAux, tn as ElementViewRule, tr as FqnRef, tt as ViewManualLayoutSnapshot, u as ViewChange, ua as exact, un as AnyViewRuleStyle, ur as IconPosition, ut as LikeC4ProjectManualLayoutsConfig, v as LayoutedLikeC4ModelData, vi as DeploymentFqn, vn as ViewRuleGlobalPredicateRef, vr as RelationshipLineType, vt as TagSpecification, w as ParsedView, wi as GroupElementKind, wn as isAutoLayoutDirection, wr as ThemeColorValues, wt as DeploymentRelation, x as AnyView, xi as ElementKind, xn as ViewType, xr as SpacingSize, xt as DeploymentElement, y as LikeC4ModelData, yi as DeploymentKind, yn as ViewRuleGlobalStyle, yr as ShapeSize, yt as isTagColorSpecified, z as DeploymentViewExcludePredicate, zi as extractStep, zn as MetadataEqual, zt as ModelGlobals } from "../_chunks/index.mjs";
|
|
2
2
|
import { a as RectBox, c as XYPoint, i as BBox, l as convertPoint, n as VectorValue, o as Dimensions, r as vector, s as Point, t as Vector, u as isPoint } from "../_chunks/index2.mjs";
|
|
3
|
-
export { AbstractRelationship, AndOperator, Any, Any as AnyAux, AnyComputed, AnyExcludePredicate, AnyFqn, AnyIncludePredicate, AnyLayouted, AnyParsed, AnyView, AnyViewRuleStyle, AutoLayoutDirection, Aux, AuxFromDump, AuxFromLikeC4ModelData, BBox, BaseParsedViewProperties, BaseViewProperties, BorderStyle, BorderStyles, BuiltInIcon, Coalesce, Color, ColorLiteral, ComputedDeploymentView, ComputedDynamicView, ComputedEdge, ComputedElementView, ComputedLikeC4ModelData, ComputedNode, ComputedNodeStyle, ComputedRankConstraint, ComputedView, CustomColor, CustomColorDefinitions, DeployedInstance, DeploymentElement, DeploymentElementRef, DeploymentFqn, DeploymentKind, DeploymentNode, DeploymentRelation, DeploymentRelationship, DeploymentViewExcludePredicate, DeploymentViewIncludePredicate, DeploymentViewPredicate, DeploymentViewRule, DeploymentViewRuleStyle, DiagramEdge, DiagramEdgeDriftReason, DiagramNode, DiagramNodeDriftReason, LayoutedView as DiagramView, LayoutedView, Dimensions, DynamicStep, DynamicStepsParallel, DynamicStepsSeries, DynamicViewDisplayVariant, DynamicViewIncludeRule, DynamicViewRule, DynamicViewStep, EdgeId, Element, ElementColorValues, ElementKind, ElementShape, ElementShapes, ElementSpecification, ElementStyle, ElementViewExcludePredicate, ElementViewIncludePredicate, ElementViewPredicate, ElementViewRule, ElementViewRuleGroup, ElementViewRuleRank, ElementViewRuleStyle, EqualOperator, ExclusiveUnion, Expression, ExtractOnStage, Filterable, Fqn, FqnExpr, FqnRef, GlobalDynamicPredicates, GlobalFqn, GlobalPredicateId, GlobalPredicates, GlobalStyleID, GlobalStyles, GroupElementKind, Guard, GuardedBy, HexColor, Icon, IconPosition, IconPositions, IconSize, IconUrl, IterableContainer, IteratorLike, KeysOf, KindEqual, LayoutType, LayoutedDeploymentView, LayoutedDynamicView, LayoutedElementView, LayoutedLikeC4ModelData, LayoutedViewDriftReason, LikeC4ModelData, LikeC4ModelDump, LikeC4Project, LikeC4ProjectManualLayoutsConfig, LikeC4ProjectStyleDefaults, LikeC4ProjectStylesConfig, LikeC4ProjectStylesCustomStylesheets, LikeC4ProjectTheme, LikeC4StyleDefaults, LikeC4StylesConfig, LikeC4Theme, ParsedView as LikeC4View, ParsedView, Link, LooseLiteral, MarkdownOrString, MetadataEqual, ModelExpression, ModelFqnExpr, ModelGlobals, ModelRelation, ModelRelationExpr, ModelStage, NTuple, NodeId, NodeNotation, NonEmptyArray, NonEmptyReadonlyArray, NoneIcon, NotOperator, OperatorPredicate, OrOperator, ParsedDeploymentView, ParsedDynamicView, ParsedElementView, ParsedLikeC4ModelData, Participant, ParticipantOperator, Point, Predicate, PredicateSelector, ProcessedView, ProjectDump, ProjectId, RankValue, RectBox, RelationExpr, RelationId, RelationKind, Relationship, RelationshipArrowType, RelationshipArrowTypes, RelationshipColorValues, RelationshipKind, RelationshipLineType, RelationshipSpecification, ReorderedArray, RichText, RichTextEmpty, RichTextOrEmpty, ShapeSize, Size, Sizes, SpacingSize, SpecAux, SpecTypesFromDump, Specification, SpecificationDump, StepEdgeId, StepEdgeIdLiteral, StepEdgeKind, Tag, TagEqual, TagSpecification, TextSize, ThemeColor, ThemeColorValues, ThemeColors, Unknown, UnknownComputed, UnknownLayouted, UnknownParsed, Vector, VectorValue, ViewAutoLayout, ViewChange, ViewId, ViewManualLayoutSnapshot, ViewOnStage, ViewRule, ViewRuleAutoLayout, ViewRuleGlobalPredicateRef, ViewRuleGlobalStyle, ViewRulePredicate, ViewRuleRank, ViewType, ViewWithHash, ViewWithNotation, ViewWithType, WhereOperator, XYPoint, _layout, _stage, _type, _aux_d_exports as aux, convertPoint, ensureSizes, exact, extractStep, flattenMarkdownOrString, getParallelStepsPrefix, hasProp, isAndOperator, isAnyOf, isAutoLayoutDirection, isComputedView, isCustomColor, isDeployedInstance, isDeploymentNode, isDeploymentView, isDiagramView, isDiagramView as isLayoutedView, isDynamicStep, isDynamicStepsParallel, isDynamicStepsSeries, isDynamicView, isElementView, isExtendsElementView, isGlobalFqn, isGroupElementKind, isKindEqual, isMetadataEqual, isNonEmptyArray, isNotOperator, isOnStage, isOrOperator, isParticipantOperator, isPoint, isScopedElementView, isStepEdgeId, isString, isTagColorSpecified, isTagEqual, isThemeColor, isViewRuleAutoLayout, isViewRuleGlobalPredicateRef, isViewRuleGlobalStyle, isViewRuleGroup, isViewRulePredicate, isViewRuleRank, isViewRuleStyle, preferDescription, preferSummary, scalar_d_exports as scalar, splitGlobalFqn, stepEdgeId, vector, whereOperatorAsPredicate };
|
|
3
|
+
export { AbstractRelationship, AndOperator, Any, Any as AnyAux, AnyComputed, AnyExcludePredicate, AnyFqn, AnyIncludePredicate, AnyLayouted, AnyParsed, AnyView, AnyViewRuleStyle, AutoLayoutDirection, Aux, AuxFromDump, AuxFromLikeC4ModelData, BBox, BaseParsedViewProperties, BaseViewProperties, BorderStyle, BorderStyles, BuiltInIcon, Coalesce, Color, ColorLiteral, ComputedDeploymentView, ComputedDynamicView, ComputedEdge, ComputedElementView, ComputedLikeC4ModelData, ComputedNode, ComputedNodeStyle, ComputedRankConstraint, ComputedView, CustomColor, CustomColorDefinitions, DeployedInstance, DeploymentElement, DeploymentElementRef, DeploymentFqn, DeploymentKind, DeploymentNode, DeploymentRelation, DeploymentRelationship, DeploymentViewExcludePredicate, DeploymentViewIncludePredicate, DeploymentViewPredicate, DeploymentViewRule, DeploymentViewRuleStyle, DiagramEdge, DiagramEdgeDriftReason, DiagramNode, DiagramNodeDriftReason, LayoutedView as DiagramView, LayoutedView, Dimensions, DynamicStep, DynamicStepsParallel, DynamicStepsSeries, DynamicViewDisplayVariant, DynamicViewIncludeRule, DynamicViewRule, DynamicViewStep, EdgeId, Element, ElementColorValues, ElementKind, ElementShape, ElementShapes, ElementSpecification, ElementStyle, ElementViewExcludePredicate, ElementViewIncludePredicate, ElementViewPredicate, ElementViewRule, ElementViewRuleGroup, ElementViewRuleRank, ElementViewRuleStyle, EqualOperator, ExclusiveUnion, Expression, ExtractOnStage, Filterable, Fqn, FqnExpr, FqnRef, GlobalDynamicPredicates, GlobalFqn, GlobalPredicateId, GlobalPredicates, GlobalStyleID, GlobalStyles, GroupElementKind, Guard, GuardedBy, HexColor, Icon, IconPosition, IconPositions, IconSize, IconUrl, IterableContainer, IteratorLike, KeysOf, KindEqual, LayoutType, LayoutedDeploymentView, LayoutedDynamicView, LayoutedElementView, LayoutedLikeC4ModelData, LayoutedViewDriftReason, LikeC4ModelData, LikeC4ModelDump, LikeC4Project, LikeC4ProjectManualLayoutsConfig, LikeC4ProjectStyleDefaults, LikeC4ProjectStylesConfig, LikeC4ProjectStylesCustomStylesheets, LikeC4ProjectTheme, LikeC4StyleDefaults, LikeC4StylesConfig, LikeC4Theme, ParsedView as LikeC4View, ParsedView, Link, LooseLiteral, MarkdownOrString, MetadataEqual, ModelExpression, ModelFqnExpr, ModelGlobals, ModelRelation, ModelRelationExpr, ModelStage, NTuple, NodeId, NodeNotation, NonEmptyArray, NonEmptyReadonlyArray, NoneIcon, NotOperator, OperatorPredicate, OrOperator, ParsedDeploymentView, ParsedDynamicView, ParsedElementView, ParsedLikeC4ModelData, ParsedViewRuleAncestors, Participant, ParticipantOperator, Point, Predicate, PredicateSelector, ProcessedView, ProjectDump, ProjectId, RankValue, RectBox, RelationExpr, RelationId, RelationKind, Relationship, RelationshipArrowType, RelationshipArrowTypes, RelationshipColorValues, RelationshipKind, RelationshipLineType, RelationshipSpecification, ReorderedArray, RichText, RichTextEmpty, RichTextOrEmpty, ShapeSize, Size, Sizes, SpacingSize, SpecAux, SpecTypesFromDump, Specification, SpecificationDump, StepEdgeId, StepEdgeIdLiteral, StepEdgeKind, Tag, TagEqual, TagSpecification, TextSize, ThemeColor, ThemeColorValues, ThemeColors, Unknown, UnknownComputed, UnknownLayouted, UnknownParsed, Vector, VectorValue, ViewAutoLayout, ViewChange, ViewId, ViewManualLayoutSnapshot, ViewOnStage, ViewRule, ViewRuleAutoLayout, ViewRuleGlobalPredicateRef, ViewRuleGlobalStyle, ViewRulePredicate, ViewRuleRank, ViewType, ViewWithHash, ViewWithNotation, ViewWithType, WhereOperator, XYPoint, _layout, _stage, _type, _aux_d_exports as aux, convertPoint, ensureSizes, exact, extractStep, flattenMarkdownOrString, getParallelStepsPrefix, hasProp, isAndOperator, isAnyOf, isAutoLayoutDirection, isComputedView, isCustomColor, isDeployedInstance, isDeploymentNode, isDeploymentView, isDiagramView, isDiagramView as isLayoutedView, isDynamicStep, isDynamicStepsParallel, isDynamicStepsSeries, isDynamicView, isElementView, isExtendsElementView, isGlobalFqn, isGroupElementKind, isKindEqual, isMetadataEqual, isNonEmptyArray, isNotOperator, isOnStage, isOrOperator, isParticipantOperator, isPoint, isScopedElementView, isStepEdgeId, isString, isTagColorSpecified, isTagEqual, isThemeColor, isViewRuleAutoLayout, isViewRuleGlobalPredicateRef, isViewRuleGlobalStyle, isViewRuleGroup, isViewRulePredicate, isViewRuleRank, isViewRuleStyle, preferDescription, preferSummary, scalar_d_exports as scalar, splitGlobalFqn, stepEdgeId, vector, whereOperatorAsPredicate };
|
package/dist/types/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,$t as t,A as n,C as r,D as i,Dn as a,E as o,
|
|
1
|
+
import{$ as e,$t as t,A as n,C as r,D as i,Dn as a,E as o,G as s,H as c,J as l,K as u,O as d,On as f,Q as p,Qt as m,S as h,T as g,U as _,V as v,W as y,X as b,Y as x,Z as S,Zt as C,_ as w,_t as T,a as E,at as D,b as O,bn as k,c as A,ct as j,d as M,dt as N,en as P,et as F,f as I,ft as L,g as ee,gt as R,h as z,ht as B,i as V,it as H,k as U,kn as W,l as G,lt as K,m as q,mt as J,n as Y,nt as X,o as Z,ot as Q,p as $,pt as te,q as ne,r as re,rt as ie,s as ae,st as oe,t as se,tt as ce,u as le,ut as ue,v as de,vt as fe,w as pe,x as me,xn as he,y as ge,yt as _e}from"../_chunks/types.mjs";export{k as BBox,b as DeploymentFqn,S as EdgeId,u as Expression,p as Fqn,ne as FqnExpr,x as FqnRef,e as GlobalFqn,F as GroupElementKind,ce as MarkdownOrString,_ as ModelExpression,y as ModelFqnExpr,s as ModelRelationExpr,X as NodeId,ie as NoneIcon,H as ProjectId,he as RectBox,l as RelationExpr,D as RelationId,se as RichText,Q as StepEdgeKind,oe as ViewId,R as _layout,T as _stage,fe as _type,n as ensureSizes,W as exact,j as extractStep,K as flattenMarkdownOrString,V as getParallelStepsPrefix,C as hasProp,me as isAndOperator,m as isAnyOf,A as isAutoLayoutDirection,I as isComputedView,v as isDeployedInstance,c as isDeploymentNode,$ as isDeploymentView,q as isDiagramView,q as isLayoutedView,E as isDynamicStep,Z as isDynamicStepsParallel,ae as isDynamicStepsSeries,z as isDynamicView,ee as isElementView,w as isExtendsElementView,ue as isGlobalFqn,N as isGroupElementKind,h as isKindEqual,r as isMetadataEqual,t as isNonEmptyArray,pe as isNotOperator,_e as isOnStage,g as isOrOperator,o as isParticipantOperator,de as isScopedElementView,L as isStepEdgeId,P as isString,U as isTagColorSpecified,i as isTagEqual,G as isViewRuleAutoLayout,le as isViewRuleGlobalPredicateRef,M as isViewRuleGlobalStyle,Y as isViewRuleGroup,ge as isViewRulePredicate,re as isViewRuleRank,O as isViewRuleStyle,a as preferDescription,f as preferSummary,te as scalar,J as splitGlobalFqn,B as stepEdgeId,d as whereOperatorAsPredicate};
|
package/dist/utils/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { a as isNonEmptyArray, o as isString } from "../_chunks/index.mjs";
|
|
2
|
-
import { a as DefaultWeakMap, i as LinkedList, n as
|
|
3
|
-
import { A as
|
|
4
|
-
export { DefaultMap, DefaultWeakMap, LinkedList, MultiMap, Queue, Stack, ancestorsFqn, commonAncestor, commonHead, compareByFqnHierarchically, compareFqnHierarchically, compareNatural, compareNaturalHierarchically, compareRelations, delay, difference, equals as equalsSet, getOrCreate, hierarchyDistance, hierarchyLevel, ifilter, ifind, ifirst, iflat, iflatMap, ihead, imap, intersection, invariant, ireduce, isAncestor, isDescendantOf, isIterable, isNonEmptyArray, isSameHierarchy, isString, isome, iunique, markdownToHtml, markdownToText, memoizeProp, nameFromFqn, nonNullable, nonexhaustive, objectHash, onNextTick, parentFqn, promiseNextTick, sortByFqnHierarchically, sortNatural, sortNaturalByFqn, sortParentsFirst, stringHash, symmetricDifference, toArray, toSet, union };
|
|
2
|
+
import { a as DefaultWeakMap, i as LinkedList, n as Queue, o as DefaultMap, r as MultiMap, t as Stack } from "../_chunks/libs/mnemonist.mjs";
|
|
3
|
+
import { A as ancestorsFqn, B as parentFqn, C as iflatMap, D as ifilter, E as ifind, F as hierarchyLevel, G as compareNaturalHierarchically, H as sortNaturalByFqn, I as isAncestor, J as invariant, K as sortNatural, L as isDescendantOf, M as compareByFqnHierarchically, N as compareFqnHierarchically, O as isIterable, P as hierarchyDistance, R as isSameHierarchy, S as ihead, T as ifirst, U as sortParentsFirst, V as sortByFqnHierarchically, W as compareNatural, X as nonexhaustive, Y as nonNullable, _ as toArray, a as objectHash, b as ireduce, c as intersection, d as compareRelations, f as delay, g as iunique, h as memoizeProp, i as stringHash, j as commonAncestor, k as getOrCreate, l as symmetricDifference, m as promiseNextTick, n as markdownToText, o as difference, p as onNextTick, q as commonHead, r as markdownToHtml, s as equals, t as unsafePartial, u as union, v as toSet, w as iflat, x as imap, y as isome, z as nameFromFqn } from "../_chunks/index5.mjs";
|
|
4
|
+
export { DefaultMap, DefaultWeakMap, LinkedList, MultiMap, Queue, Stack, ancestorsFqn, commonAncestor, commonHead, compareByFqnHierarchically, compareFqnHierarchically, compareNatural, compareNaturalHierarchically, compareRelations, delay, difference, equals as equalsSet, getOrCreate, hierarchyDistance, hierarchyLevel, ifilter, ifind, ifirst, iflat, iflatMap, ihead, imap, intersection, invariant, ireduce, isAncestor, isDescendantOf, isIterable, isNonEmptyArray, isSameHierarchy, isString, isome, iunique, markdownToHtml, markdownToText, memoizeProp, nameFromFqn, nonNullable, nonexhaustive, objectHash, onNextTick, parentFqn, promiseNextTick, sortByFqnHierarchically, sortNatural, sortNaturalByFqn, sortParentsFirst, stringHash, symmetricDifference, toArray, toSet, union, unsafePartial };
|
package/dist/utils/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$t as e,At as t,Bt as n,Cn as r,Ct as i,Dt as a,Et as o,Ft as s,Gt as c,Ht as l,It as u,Jt as d,Kt as f,Lt as p,Mt as m,Nt as h,
|
|
1
|
+
import{$t as e,At as t,Bt as n,Cn as r,Ct as i,Dt as a,Et as o,Ft as s,Gt as c,Ht as l,It as u,Jt as d,Kt as f,Lt as p,Mt as m,Nt as h,Ot as g,Pt as _,Rt as v,Sn as y,St as b,Tt as x,Ut as S,Vt as C,Wt as w,Xt as T,Yt as E,_n as D,an as O,cn as k,dn as A,en as j,fn as M,gn as N,hn as P,in as F,jt as I,ln as L,mn as R,nn as z,on as B,pn as V,qt as H,rn as U,sn as W,tn as G,un as K,vn as q,wn as J,wt as Y,yn as X,zt as Z}from"../_chunks/types.mjs";import{a as Q,c as $,n as ee,o as te,r as ne,t as re}from"../_chunks/libs/mnemonist.mjs";var ie=re.default,ae=ee.default,oe=ne.default,se=Q.default,ce=te.default,le=$.default;export{ie as DefaultMap,ae as DefaultWeakMap,oe as LinkedList,se as MultiMap,ce as Queue,le as Stack,z as ancestorsFqn,U as commonAncestor,X as commonHead,F as compareByFqnHierarchically,O as compareFqnHierarchically,N as compareNatural,D as compareNaturalHierarchically,h as compareRelations,_ as delay,a as difference,g as equalsSet,G as getOrCreate,B as hierarchyDistance,W as hierarchyLevel,E as ifilter,d as ifind,H as ifirst,f as iflat,c as iflatMap,w as ihead,S as imap,t as intersection,y as invariant,l as ireduce,k as isAncestor,L as isDescendantOf,T as isIterable,e as isNonEmptyArray,K as isSameHierarchy,j as isString,C as isome,v as iunique,Y as markdownToHtml,i as markdownToText,p as memoizeProp,A as nameFromFqn,r as nonNullable,J as nonexhaustive,o as objectHash,s as onNextTick,M as parentFqn,u as promiseNextTick,V as sortByFqnHierarchically,q as sortNatural,R as sortNaturalByFqn,P as sortParentsFirst,x as stringHash,I as symmetricDifference,Z as toArray,n as toSet,m as union,b as unsafePartial};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@likec4/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.57.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://likec4.dev",
|
|
6
6
|
"author": "Denis Davydkov <denis@davydkov.com>",
|
|
@@ -108,16 +108,16 @@
|
|
|
108
108
|
},
|
|
109
109
|
"devDependencies": {
|
|
110
110
|
"@dagrejs/dagre": "1.1.8",
|
|
111
|
-
"@mantine/colors-generator": "9.1
|
|
111
|
+
"@mantine/colors-generator": "9.2.1",
|
|
112
112
|
"@rolldown/plugin-node-polyfills": "^1.0.3",
|
|
113
113
|
"@types/chroma-js": "^3.1.2",
|
|
114
114
|
"@types/extend": "3.0.4",
|
|
115
115
|
"@types/hast": "3.0.4",
|
|
116
116
|
"@types/mdast": "4.0.4",
|
|
117
117
|
"@types/natural-compare-lite": "^1.4.2",
|
|
118
|
-
"@types/node": "~22.19.
|
|
118
|
+
"@types/node": "~22.19.19",
|
|
119
119
|
"@types/unist": "3.0.3",
|
|
120
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
120
|
+
"@typescript/native-preview": "7.0.0-dev.20260504.1",
|
|
121
121
|
"chroma-js": "3.2.0",
|
|
122
122
|
"defu": "^6.1.7",
|
|
123
123
|
"fdir": "6.4.0",
|
|
@@ -141,14 +141,14 @@
|
|
|
141
141
|
"remark-parse": "11.0.0",
|
|
142
142
|
"remark-rehype": "11.1.2",
|
|
143
143
|
"remeda": "^2.33.7",
|
|
144
|
-
"turbo": "2.9.
|
|
144
|
+
"turbo": "2.9.14",
|
|
145
145
|
"typescript": "5.9.3",
|
|
146
146
|
"unified": "11.0.5",
|
|
147
147
|
"vitest": "4.1.3",
|
|
148
|
-
"@likec4/devops": "1.
|
|
149
|
-
"@likec4/
|
|
150
|
-
"@likec4/
|
|
151
|
-
"@likec4/tsconfig": "1.
|
|
148
|
+
"@likec4/devops": "1.57.0",
|
|
149
|
+
"@likec4/style-preset": "1.57.0",
|
|
150
|
+
"@likec4/styles": "1.57.0",
|
|
151
|
+
"@likec4/tsconfig": "1.57.0"
|
|
152
152
|
},
|
|
153
153
|
"scripts": {
|
|
154
154
|
"typecheck": "tsc -b --verbose",
|