@likec4/core 1.51.0 → 1.53.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.
@@ -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{B as m,J as h,U as g,_t as _,g as v,gt as y,lt as b,pt as x,xt as S}from"../_chunks/types.mjs";import"../_chunks/geometry.mjs";import{B as C,Q as w,R as T,z as E}from"../_chunks/utils.mjs";import"../_chunks/libs/graphology-dag.mjs";import{t as D}from"../_chunks/libs/mnemonist.mjs";import"../_chunks/libs/natural-compare-lite.mjs";import"../_chunks/libs/ohash.mjs";import"../_chunks/libs/@ungap/structured-clone.mjs";import"../_chunks/libs/hast-util-sanitize.mjs";import"../_chunks/libs/rehype-sanitize.mjs";import"../_chunks/libs/hast-util-to-html.mjs";import"../_chunks/libs/character-entities-legacy.mjs";import"../_chunks/libs/character-entities-html4.mjs";import"../_chunks/libs/ccount.mjs";import"../_chunks/libs/comma-separated-tokens.mjs";import"../_chunks/libs/rehype-stringify.mjs";import"../_chunks/libs/devlop.mjs";import"../_chunks/libs/mdast-util-from-markdown.mjs";import"../_chunks/libs/escape-string-regexp.mjs";import"../_chunks/libs/mdast-util-find-and-replace.mjs";import"../_chunks/libs/mdast-util-gfm.mjs";import"../_chunks/libs/markdown-table.mjs";import"../_chunks/libs/longest-streak.mjs";import"../_chunks/libs/character-entities.mjs";import"../_chunks/libs/decode-named-character-reference.mjs";import"../_chunks/libs/micromark-extension-gfm.mjs";import"../_chunks/libs/remark-gfm.mjs";import"../_chunks/libs/remark-github-blockquote-alert.mjs";import"../_chunks/libs/remark-parse.mjs";import"../_chunks/libs/mdast-util-to-hast.mjs";import"../_chunks/libs/remark-rehype.mjs";import"../_chunks/libs/bail.mjs";import"../_chunks/libs/extend.mjs";import"../_chunks/libs/is-plain-obj.mjs";import"../_chunks/libs/trough.mjs";import"../_chunks/libs/unified.mjs";import"../_chunks/libs/@radix-ui/colors.mjs";import"../_chunks/libs/@mantine/colors-generator.mjs";import"../_chunks/model.mjs";import"../_chunks/manual-layout.mjs";import{n as O,t as k}from"../_chunks/Builder.view-element.mjs";import"../_chunks/libs/graphology.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=>{let n=t.$expr(e[0]);if(e.length===2){let t=e[1].where?j(e[1].where):void 0;t&&(n={where:{expr:n,condition:t}});let r=e[1].with;r&&(n=g.is(n)?{custom:{...r,expr:n}}:{customRelation:{...r,expr:n}})}return t.include(n),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){return t=>t.autoLayout(e)}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[_]===`deployment`?L:k,autoLayout(n){return e.rules.push({direction:n}),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}};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)w(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)w(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[S({id:e,title:a,description:V(o),tags:s,links:l,_stage:`parsed`,...c}),n]},K=e=>{let[t,n]=x(e),r=(t?L.get(t):s).get(n);return w(r,`Element with id "${e}" not found`),r},q=e=>{if(typeof e==`string`){let[t,n]=x(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]=x(e.id),r=C(n),i=t?L.get(t):s;if(r&&w(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=h.flatten(t),r=q(e.target),i=h.flatten(r),a=K(n),o=K(i);if(b(n)&&b(i))throw Error(`Cannot create relationship between global elements`);return!b(n)&&!b(i)&&w(!T(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 w(e.trim()!==``,`Id must be non-empty`),e},__deploymentFqn(e){return w(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 v(e)&&`viewOf`in e&&w(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=C(e.id);return t&&w(k.get(t),`Parent element with id "${t}" not found for node with id "${e.id}"`),m(e)&&(w(t,`Instance ${e.id} of ${e.element} must be deployed under a parent node`),w(s.get(e.element),`Instance "${e.id}" references non-existing element "${e.element}"`)),k.set(e.id,e),J},__addDeploymentRelation:e=>(w(!T(e.source.deployment,e.target.deployment),`Cannot create relationship between elements in the same hierarchy`),w(k.has(e.source.deployment),`Relation "${e.source.deployment} -> ${e.target.deployment}" references non-existing source`),w(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=>({[y]:`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(S({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(S({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,...m}=typeof i==`string`?{title:i}:{...i},h=s??e?.icon,g=a.__fqn(r);return a.__addElement(S({id:g,kind:n,title:d??E(g),...f&&{description:V(f)},...p&&{summary:V(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}),links:W(o),...t,...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]=G(e,t,n),a={...r,[_]:`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,[_]:`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,[_]:`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=E(e)):typeof t==`string`?n??={}:(n=t,t=e,e=E(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:V(c)},...s&&{description:V(s)},style:S({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(S({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,...m}=typeof i==`string`?{title:i}:{...i},h=s??e?.icon,g=a.__deploymentFqn(r);return a.__addDeployment(S({id:g,kind:n,title:l??E(g),...u&&{description:V(u)},...d&&{summary:V(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}),links:W(o),...t,...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=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{St as m,V as h,W as g,Y as _,_t as v,g as y,mt as b,ut as x,vt as S}from"../_chunks/types.mjs";import"../_chunks/geometry.mjs";import{B as C,Q as w,R as T,z as E}from"../_chunks/utils.mjs";import"../_chunks/libs/graphology-dag.mjs";import{t as D}from"../_chunks/libs/mnemonist.mjs";import"../_chunks/libs/natural-compare-lite.mjs";import"../_chunks/libs/ohash.mjs";import"../_chunks/libs/@ungap/structured-clone.mjs";import"../_chunks/libs/hast-util-sanitize.mjs";import"../_chunks/libs/rehype-sanitize.mjs";import"../_chunks/libs/hast-util-to-html.mjs";import"../_chunks/libs/character-entities-legacy.mjs";import"../_chunks/libs/character-entities-html4.mjs";import"../_chunks/libs/ccount.mjs";import"../_chunks/libs/comma-separated-tokens.mjs";import"../_chunks/libs/rehype-stringify.mjs";import"../_chunks/libs/devlop.mjs";import"../_chunks/libs/mdast-util-from-markdown.mjs";import"../_chunks/libs/escape-string-regexp.mjs";import"../_chunks/libs/mdast-util-find-and-replace.mjs";import"../_chunks/libs/mdast-util-gfm.mjs";import"../_chunks/libs/markdown-table.mjs";import"../_chunks/libs/longest-streak.mjs";import"../_chunks/libs/character-entities.mjs";import"../_chunks/libs/decode-named-character-reference.mjs";import"../_chunks/libs/micromark-extension-gfm.mjs";import"../_chunks/libs/remark-gfm.mjs";import"../_chunks/libs/remark-github-blockquote-alert.mjs";import"../_chunks/libs/remark-parse.mjs";import"../_chunks/libs/mdast-util-to-hast.mjs";import"../_chunks/libs/remark-rehype.mjs";import"../_chunks/libs/bail.mjs";import"../_chunks/libs/extend.mjs";import"../_chunks/libs/is-plain-obj.mjs";import"../_chunks/libs/trough.mjs";import"../_chunks/libs/unified.mjs";import"../_chunks/libs/@radix-ui/colors.mjs";import"../_chunks/libs/@mantine/colors-generator.mjs";import"../_chunks/model.mjs";import"../_chunks/manual-layout.mjs";import{n as O,t as k}from"../_chunks/Builder.view-element.mjs";import"../_chunks/libs/graphology.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[S]===`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)w(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)w(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]=b(e),r=(t?L.get(t):s).get(n);return w(r,`Element with id "${e}" not found`),r},q=e=>{if(typeof e==`string`){let[t,n]=b(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]=b(e.id),r=C(n),i=t?L.get(t):s;if(r&&w(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(x(n)&&x(i))throw Error(`Cannot create relationship between global elements`);return!x(n)&&!x(i)&&w(!T(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 w(e.trim()!==``,`Id must be non-empty`),e},__deploymentFqn(e){return w(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 y(e)&&`viewOf`in e&&w(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=C(e.id);return t&&w(k.get(t),`Parent element with id "${t}" not found for node with id "${e.id}"`),h(e)&&(w(t,`Instance ${e.id} of ${e.element} must be deployed under a parent node`),w(s.get(e.element),`Instance "${e.id}" references non-existing element "${e.element}"`)),k.set(e.id,e),J},__addDeploymentRelation:e=>(w(!T(e.source.deployment,e.target.deployment),`Cannot create relationship between elements in the same hierarchy`),w(k.has(e.source.deployment),`Relation "${e.source.deployment} -> ${e.target.deployment}" references non-existing source`),w(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,_=a.__fqn(r);return a.__addElement(m({id:_,kind:n,title:d??E(_),...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:W(o),...t,...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,[S]:`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,[S]:`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,[S]:`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=E(e)):typeof t==`string`?n??={}:(n=t,t=e,e=E(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,_=a.__deploymentFqn(r);return a.__addDeployment(m({id:_,kind:n,title:l??E(_),...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:W(o),...t,...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,4 +1,4 @@
1
- import { Br as ElementId, Ji as _stage, On as ModelExpression, Pr as AnyParsed, S as ComputedView, Yi as _type, _ as ComputedLikeC4ModelData, at as ComputedNode, b as ParsedLikeC4ModelData, ci as ViewId, cn as AnyIncludePredicate, fn as BaseViewProperties, hn as ViewAutoLayout, ia as NonEmptyArray, ii as Unknown, jr as Any, pi as toComputed, rt as ComputedEdge, sn as AnyExcludePredicate, w as ParsedView } from "../_chunks/index.mjs";
1
+ import { Dn as ModelExpression, Fr as AnyParsed, Mr as Any, S as ComputedView, Vr as ElementId, Xi as _type, Yi as _stage, _ as ComputedLikeC4ModelData, aa as NonEmptyArray, ai as Unknown, at as ComputedNode, b as ParsedLikeC4ModelData, cn as AnyIncludePredicate, fn as BaseViewProperties, hn as ViewAutoLayout, li as ViewId, mi as toComputed, rt as ComputedEdge, sn as AnyExcludePredicate, w as ParsedView } from "../_chunks/index.mjs";
2
2
  import "../_chunks/index2.mjs";
3
3
  import "../_chunks/index3.mjs";
4
4
  import "../_chunks/libs/mnemonist.mjs";
@@ -1,2 +1,2 @@
1
- import{r as e}from"../_chunks/rolldown-runtime.mjs";import"../_chunks/libs/defu.mjs";import{$ as t,C as n,D as r,K as i,L as a,Q as o,S as s,T as c,X as l,Y as u,b as d,d as f,et as p,i as m,m as h,r as ee,w as te,y as ne}from"../_chunks/libs/remeda.mjs";import{Q as g,_,_t as v,bt as y,g as re,gt as ie,ot as ae,rt as b}from"../_chunks/types.mjs";import"../_chunks/geometry.mjs";import{$ as x,D as S,I as C,K as w,L as T,Q as E,U as D,_ as O,r as k,v as A,x as j}from"../_chunks/utils.mjs";import{n as M,t as N}from"../_chunks/libs/graphology-dag.mjs";import{t as P}from"../_chunks/libs/mnemonist.mjs";import"../_chunks/libs/natural-compare-lite.mjs";import"../_chunks/libs/ohash.mjs";import"../_chunks/libs/@ungap/structured-clone.mjs";import"../_chunks/libs/hast-util-sanitize.mjs";import"../_chunks/libs/rehype-sanitize.mjs";import"../_chunks/libs/hast-util-to-html.mjs";import"../_chunks/libs/character-entities-legacy.mjs";import"../_chunks/libs/character-entities-html4.mjs";import"../_chunks/libs/ccount.mjs";import"../_chunks/libs/comma-separated-tokens.mjs";import"../_chunks/libs/rehype-stringify.mjs";import"../_chunks/libs/devlop.mjs";import"../_chunks/libs/mdast-util-from-markdown.mjs";import"../_chunks/libs/escape-string-regexp.mjs";import"../_chunks/libs/mdast-util-find-and-replace.mjs";import"../_chunks/libs/mdast-util-gfm.mjs";import"../_chunks/libs/markdown-table.mjs";import"../_chunks/libs/longest-streak.mjs";import"../_chunks/libs/character-entities.mjs";import"../_chunks/libs/decode-named-character-reference.mjs";import"../_chunks/libs/micromark-extension-gfm.mjs";import"../_chunks/libs/remark-gfm.mjs";import"../_chunks/libs/remark-github-blockquote-alert.mjs";import"../_chunks/libs/remark-parse.mjs";import"../_chunks/libs/mdast-util-to-hast.mjs";import"../_chunks/libs/remark-rehype.mjs";import"../_chunks/libs/bail.mjs";import"../_chunks/libs/extend.mjs";import"../_chunks/libs/is-plain-obj.mjs";import"../_chunks/libs/trough.mjs";import"../_chunks/libs/unified.mjs";import"../_chunks/libs/@radix-ui/colors.mjs";import"../_chunks/libs/@mantine/colors-generator.mjs";import"../_chunks/model.mjs";import"../_chunks/manual-layout.mjs";import{a as F,c as I,i as L,n as R,o as z,r as B,s as V,t as H}from"../_chunks/Builder.view-element.mjs";import{t as U}from"../_chunks/libs/graphology.mjs";var W=M(),G=e(N(),1);function K(e){let t=new U({type:`directed`}),n=[];for(let r of ee(e))t.addNode(r.id,{view:r}),_(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,G.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(!_(r))return e[r.id]=r,e;let i=e[r.extends];if(!i||!re(i))return e;let a=m([...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:w(o)?o:null,rules:[...i.rules,...r.rules]},e},{})}function q({edges:e,nodes:t,...n},r=`:`){let i=te(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:c(e.inEdges,e=>i[e]),outEdges:c(e.outEdges,e=>i[e])})),nodeIds:t.map(e=>e.id),edgeIds:e.map(e=>i[e.id])}}function oe({views:e,...t}){return{...t,views:n(e,e=>s(q(e),[`nodeIds`,`edgeIds`]))}}const J=e=>r(e).length,Y=e=>k(e);function se(e){let t=ce(e),n=(e,t)=>`${e}->${t}`,r=new P.default(e=>{let[t,n]=e.split(`->`);return{from:t,to:n,relationships:new Set}}),s=(e,t)=>r.get(n(e,t)).relationships,u=(e,t)=>{let n=t.projectId;E(n!==e.projectId,`Imported element must have a different project id`);let r=s(e.projectId,n);for(let n of t.incoming(`direct`))n.source.projectId===e.projectId&&r.add(n);let i=s(n,e.projectId);for(let n of t.outgoing(`direct`))n.target.projectId===e.projectId&&i.add(n)};for(let t of e)if(!a(t.$data.imports))for(let[e,n]of l(t.$data.imports))for(let r of n){let n=g(e,r.id);u(t,x(t.findElement(n),`Element ${r.id} from project ${e} not found in model ${t.projectId}`))}let d=Array.from(r.entries()).filter(([e,{relationships:t}])=>t.size>0).map(([e,{from:t,to:n,relationships:r}])=>{let a=[...r];E(o(a,1),`Relationships set must have at least one relationship`);let s={id:k(e),source:Y(t),target:Y(n),projectId:t,relations:c(a,h(`id`)),label:null,color:`gray`,parent:null,line:`solid`,tags:m(i(a,h(`tags`)))},l=ne(a);return l&&(s.label=l.title,s.description=y(l.$relationship)??null,s.technology=l.technology,s.color=l.color,s.line=l.line,l.kind&&(s.kind=l.kind),l.$relationship.navigateTo&&(s.navigateTo=l.$relationship.navigateTo)),s});I(t,d);let f=V({nodes:t,edges:d});return{id:`projects-view`,[v]:`projects`,[ie]:`computed`,title:`Projects`,description:{txt:`Overview of all projects and their relationships`},autoLayout:{direction:`TB`},...f}}function ce(e){let t=new Map;for(let n of e){let e=b(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(e){let n=D([...e]),r=new Set(n),i=new Map,a=new P.default(()=>null),o=n.reduce((e,n,o,s)=>(i.set(n.id,n),e.set(n.id,p(s,t(o+1),u(T(n)),f((e,t)=>(r.delete(t),e.some(C(t))||(e.push(t),a.set(t.id,n)),e),[]))),e),new P.default(()=>[]));return{sorted:n,byId:e=>x(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:d(()=>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(D([...X(e).flatten(),...t])):e.size>1?new Set(D([...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 le(e,t,n,r=`global`){let i=n?t.findView(n):null;if(r===`view`)return E(i,`Scope view id is required when scope is "view"`),ue(e,i,t);let a=t.element(e);return Q(a,A(a.ascendingSiblings()),{incoming:[...a.incoming()],outgoing:[...a.outgoing()]})}function ue(e,t,n){let r=n.element(e),i={incoming:O(S(r.incoming(),e=>t.includesRelation(e.id))),outgoing:O(S(r.outgoing(),e=>t.includesRelation(e.id)))},a=T(r);return Q(r,new Set([...r.ascendingSiblings(),...p(t.elements(),j(e=>e.element),S(e=>e!==r&&a(e)))]),i)}function $(e,t){return{...z(e,{id:ae(`adhoc`),_stage:`parsed`,_type:`element`,rules:t,title:null,description:null}),_type:`adhoc`,_stage:`computed`}}var de=class e{static use(t){return new e(t)}#e=[];constructor(e){this.model=e}Expr;include(...e){return this.#e.push({include:e.map(e=>H(e))}),this}exclude(...e){return this.#e.push({exclude:e.map(e=>H(e))}),this}compute(){return $(this.model,this.#e)}};export{de as AdhocView,$ as computeAdhocView,R as computeLikeC4Model,B as computeParsedModelData,se as computeProjectsView,le as computeRelationshipsView,L as computeView,K as resolveRulesExtendedViews,X as treeFromElements,F as unsafeComputeView,oe as viewsWithReadableEdges,q as withReadableEdges};
1
+ import{r as e}from"../_chunks/rolldown-runtime.mjs";import"../_chunks/libs/defu.mjs";import{$ as t,C as n,D as r,K as i,L as a,Q as o,S as s,T as c,X as l,Y as u,b as d,d as f,et as p,i as m,m as h,r as ee,w as te,y as ne}from"../_chunks/libs/remeda.mjs";import{$ as g,_,_t as v,g as y,it as re,st as ie,vt as ae,xt as b}from"../_chunks/types.mjs";import"../_chunks/geometry.mjs";import{$ as x,D as S,I as C,K as w,L as T,Q as E,U as D,_ as O,r as k,v as A,x as j}from"../_chunks/utils.mjs";import{n as M,t as N}from"../_chunks/libs/graphology-dag.mjs";import{t as P}from"../_chunks/libs/mnemonist.mjs";import"../_chunks/libs/natural-compare-lite.mjs";import"../_chunks/libs/ohash.mjs";import"../_chunks/libs/@ungap/structured-clone.mjs";import"../_chunks/libs/hast-util-sanitize.mjs";import"../_chunks/libs/rehype-sanitize.mjs";import"../_chunks/libs/hast-util-to-html.mjs";import"../_chunks/libs/character-entities-legacy.mjs";import"../_chunks/libs/character-entities-html4.mjs";import"../_chunks/libs/ccount.mjs";import"../_chunks/libs/comma-separated-tokens.mjs";import"../_chunks/libs/rehype-stringify.mjs";import"../_chunks/libs/devlop.mjs";import"../_chunks/libs/mdast-util-from-markdown.mjs";import"../_chunks/libs/escape-string-regexp.mjs";import"../_chunks/libs/mdast-util-find-and-replace.mjs";import"../_chunks/libs/mdast-util-gfm.mjs";import"../_chunks/libs/markdown-table.mjs";import"../_chunks/libs/longest-streak.mjs";import"../_chunks/libs/character-entities.mjs";import"../_chunks/libs/decode-named-character-reference.mjs";import"../_chunks/libs/micromark-extension-gfm.mjs";import"../_chunks/libs/remark-gfm.mjs";import"../_chunks/libs/remark-github-blockquote-alert.mjs";import"../_chunks/libs/remark-parse.mjs";import"../_chunks/libs/mdast-util-to-hast.mjs";import"../_chunks/libs/remark-rehype.mjs";import"../_chunks/libs/bail.mjs";import"../_chunks/libs/extend.mjs";import"../_chunks/libs/is-plain-obj.mjs";import"../_chunks/libs/trough.mjs";import"../_chunks/libs/unified.mjs";import"../_chunks/libs/@radix-ui/colors.mjs";import"../_chunks/libs/@mantine/colors-generator.mjs";import"../_chunks/model.mjs";import"../_chunks/manual-layout.mjs";import{a as F,c as I,i as L,n as R,o as z,r as B,s as V,t as H}from"../_chunks/Builder.view-element.mjs";import{t as U}from"../_chunks/libs/graphology.mjs";var W=M(),G=e(N(),1);function K(e){let t=new U({type:`directed`}),n=[];for(let r of ee(e))t.addNode(r.id,{view:r}),_(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,G.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(!_(r))return e[r.id]=r,e;let i=e[r.extends];if(!i||!y(i))return e;let a=m([...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:w(o)?o:null,rules:[...i.rules,...r.rules]},e},{})}function q({edges:e,nodes:t,...n},r=`:`){let i=te(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:c(e.inEdges,e=>i[e]),outEdges:c(e.outEdges,e=>i[e])})),nodeIds:t.map(e=>e.id),edgeIds:e.map(e=>i[e.id])}}function oe({views:e,...t}){return{...t,views:n(e,e=>s(q(e),[`nodeIds`,`edgeIds`]))}}const J=e=>r(e).length,Y=e=>k(e);function se(e){let t=ce(e),n=(e,t)=>`${e}->${t}`,r=new P.default(e=>{let[t,n]=e.split(`->`);return{from:t,to:n,relationships:new Set}}),s=(e,t)=>r.get(n(e,t)).relationships,u=(e,t)=>{let n=t.projectId;E(n!==e.projectId,`Imported element must have a different project id`);let r=s(e.projectId,n);for(let n of t.incoming(`direct`))n.source.projectId===e.projectId&&r.add(n);let i=s(n,e.projectId);for(let n of t.outgoing(`direct`))n.target.projectId===e.projectId&&i.add(n)};for(let t of e)if(!a(t.$data.imports))for(let[e,n]of l(t.$data.imports))for(let r of n){let n=g(e,r.id);u(t,x(t.findElement(n),`Element ${r.id} from project ${e} not found in model ${t.projectId}`))}let d=Array.from(r.entries()).filter(([e,{relationships:t}])=>t.size>0).map(([e,{from:t,to:n,relationships:r}])=>{let a=[...r];E(o(a,1),`Relationships set must have at least one relationship`);let s={id:k(e),source:Y(t),target:Y(n),projectId:t,relations:c(a,h(`id`)),label:null,color:`gray`,parent:null,line:`solid`,tags:m(i(a,h(`tags`)))},l=ne(a);return l&&(s.label=l.title,s.description=b(l.$relationship)??null,s.technology=l.technology,s.color=l.color,s.line=l.line,l.kind&&(s.kind=l.kind),l.$relationship.navigateTo&&(s.navigateTo=l.$relationship.navigateTo)),s});I(t,d);let f=V({nodes:t,edges:d});return{id:`projects-view`,[ae]:`projects`,[v]:`computed`,title:`Projects`,description:{txt:`Overview of all projects and their relationships`},autoLayout:{direction:`TB`},...f}}function ce(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(e){let n=D([...e]),r=new Set(n),i=new Map,a=new P.default(()=>null),o=n.reduce((e,n,o,s)=>(i.set(n.id,n),e.set(n.id,p(s,t(o+1),u(T(n)),f((e,t)=>(r.delete(t),e.some(C(t))||(e.push(t),a.set(t.id,n)),e),[]))),e),new P.default(()=>[]));return{sorted:n,byId:e=>x(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:d(()=>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(D([...X(e).flatten(),...t])):e.size>1?new Set(D([...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 le(e,t,n,r=`global`){let i=n?t.findView(n):null;if(r===`view`)return E(i,`Scope view id is required when scope is "view"`),ue(e,i,t);let a=t.element(e);return Q(a,A(a.ascendingSiblings()),{incoming:[...a.incoming()],outgoing:[...a.outgoing()]})}function ue(e,t,n){let r=n.element(e),i={incoming:O(S(r.incoming(),e=>t.includesRelation(e.id))),outgoing:O(S(r.outgoing(),e=>t.includesRelation(e.id)))},a=T(r);return Q(r,new Set([...r.ascendingSiblings(),...p(t.elements(),j(e=>e.element),S(e=>e!==r&&a(e)))]),i)}function $(e,t){return{...z(e,{id:ie(`adhoc`),_stage:`parsed`,_type:`element`,rules:t,title:null,description:null}),_type:`adhoc`,_stage:`computed`}}var de=class e{static use(t){return new e(t)}#e=[];constructor(e){this.model=e}Expr;include(...e){return this.#e.push({include:e.map(e=>H(e))}),this}exclude(...e){return this.#e.push({exclude:e.map(e=>H(e))}),this}compute(){return $(this.model,this.#e)}};export{de as AdhocView,$ as computeAdhocView,R as computeLikeC4Model,B as computeParsedModelData,se as computeProjectsView,le as computeRelationshipsView,L as computeView,K as resolveRulesExtendedViews,X as treeFromElements,F as unsafeComputeView,oe as viewsWithReadableEdges,q as withReadableEdges};
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as LayoutedViewDriftReason, $i as IterableContainer, $n as FqnRef, $r as SpecAux, $t as ElementViewPredicate, A as isComputedView, Ai as RelationKind, An as ModelRelationExpr, Ar as ThemeColors, At as ModelRelation, B as DeploymentViewIncludePredicate, Bi as isGroupElementKind, Bn as OperatorPredicate, Bt as DynamicStepsParallel, C as LayoutedView, Ci as Icon, Cn as ViewWithNotation, Cr as isCustomColor, Ct as DeploymentRelation, D as ViewRule, Di as NoneIcon, Dn as isViewRuleGlobalStyle, Dr as ElementShapes, Dt as AbstractRelationship, E as ViewOnStage, Ei as NodeId, En as isViewRuleGlobalPredicateRef, Et as isDeploymentNode, F as isExtendsElementView, Fi as Tag, Fn as AndOperator, Fr as Aux, Ft as GlobalPredicates, G as DiagramEdge, Gi as ExtractOnStage, Gn as WhereOperator, Gr as LooseLiteral, Gt as DynamicViewStep, H as DeploymentViewRule, Hi as scalar_d_exports, Hn as Participant, Ht as DynamicViewDisplayVariant, I as isScopedElementView, Ii as ViewId, In as EqualOperator, It as GlobalStyleID, J as LayoutedDeploymentView, Ji as _stage, Jn as isNotOperator, Jt as isDynamicStep, K as DiagramNode, Ki as ModelStage, Kn as isAndOperator, Kt as ParsedDynamicView, L as isViewRulePredicate, Li as extractStep, Ln as Filterable, Lt as GlobalStyles, M as isDiagramView, Mi as StepEdgeId, Mn as FqnExpr, Mr as AnyComputed, Mt as ensureSizes, N as isDynamicView, Ni as StepEdgeIdLiteral, Nn as PredicateSelector, Nr as AnyLayouted, Nt as GlobalDynamicPredicates, O as ViewRulePredicate, Oi as ProjectId, On as ModelExpression, Or as IconPositions, Ot as Element, P as isElementView, Pi as StepEdgeKind, Pn as RelationExpr, Pr as AnyParsed, Pt as GlobalPredicateId, Q as DiagramNodeDriftReason, Qi as ExclusiveUnion, Qn as whereOperatorAsPredicate, Qt as ElementViewIncludePredicate, R as isViewRuleStyle, Ri as flattenMarkdownOrString, Rn as KindEqual, Rt as ModelGlobals, S as ComputedView, Si as GroupElementKind, Sn as ViewWithHash, Sr as ThemeColorValues, St as DeploymentNode, T as ProcessedView, Ti as MarkdownOrString, Tn as isViewRuleAutoLayout, Tr as BorderStyles, Tt as isDeployedInstance, U as DeploymentViewRuleStyle, Ui as splitGlobalFqn, Un as ParticipantOperator, Ut as DynamicViewIncludeRule, V as DeploymentViewPredicate, Vi as isStepEdgeId, Vn as OrOperator, Vt as DynamicStepsSeries, W as ParsedDeploymentView, Wi as stepEdgeId, Wn as TagEqual, Wt as DynamicViewRule, X as LayoutedElementView, Xi as isOnStage, Xn as isParticipantOperator, Xt as isDynamicStepsSeries, Y as LayoutedDynamicView, Yi as _type, Yn as isOrOperator, Yt as isDynamicStepsParallel, Z as DiagramEdgeDriftReason, Zi as Coalesce, Zn as isTagEqual, Zt as ElementViewExcludePredicate, _ as ComputedLikeC4ModelData, _i as DeploymentKind, _n as ViewRuleAutoLayout, _r as ShapeSize, _t as TagSpecification, a as isNonEmptyArray, aa as NonEmptyReadonlyArray, ai as UnknownComputed, an as isViewRuleGroup, ar as ElementColorValues, at as ComputedNode, b as ParsedLikeC4ModelData, bi as Fqn, bn as ViewRuleRank, br as TextSize, bt as DeploymentElement, c as RichTextEmpty, ca as exact, cn as AnyIncludePredicate, cr as IconPosition, ct as LikeC4Project, d as AuxFromDump, di as preferSummary, dn as BaseParsedViewProperties, dr as LikeC4StylesConfig, dt as LikeC4ProjectStylesConfig, ea as IteratorLike, en as ElementViewRule, er as BorderStyle, et as ViewManualLayoutSnapshot, f as LikeC4ModelDump, fn as BaseViewProperties, fr as LikeC4Theme, ft as LikeC4ProjectStylesCustomStylesheets, g as AuxFromLikeC4ModelData, gi as DeploymentFqn, gn as ViewManualLayout, gr as RelationshipLineType, gt as Specification, h as SpecificationDump, hi as BuiltInIcon, hn as ViewAutoLayout, hr as RelationshipColorValues, ht as RelationshipSpecification, i as isAnyOf, ia as NonEmptyArray, ii as Unknown, in as ParsedElementView, ir as CustomColorDefinitions, it as ComputedElementView, j as isDeploymentView, ji as RelationshipKind, jn as Expression, jr as Any, jt as Relationship, k as ViewWithType, ki as RelationId, kn as ModelFqnExpr, kr as Sizes, kt as ElementStyle, l as RichTextOrEmpty, li as _aux_d_exports, ln as AnyViewRuleStyle, lr as IconSize, lt as LikeC4ProjectManualLayoutsConfig, m as SpecTypesFromDump, mi as AnyFqn, mn as RankValue, mr as RelationshipArrowTypes, mt as ElementSpecification, n as GuardedBy, na as Link, nn as ElementViewRuleRank, nr as ColorLiteral, nt as ComputedDynamicView, o as isString, oa as Predicate, oi as UnknownLayouted, on as isViewRuleRank, or as ElementShape, ot as ComputedNodeStyle, p as ProjectDump, pn as NodeNotation, pr as RelationshipArrowType, pt as LikeC4ProjectTheme, q as LayoutType, qi as _layout, qn as isKindEqual, qt as getParallelStepsPrefix, r as hasProp, ra as NTuple, rn as ElementViewRuleStyle, rr as CustomColor, rt as ComputedEdge, s as RichText, sa as ReorderedArray, si as UnknownParsed, sn as AnyExcludePredicate, sr as HexColor, st as ComputedRankConstraint, t as Guard, ta as KeysOf, tn as ElementViewRuleGroup, tr as Color, tt as ComputedDeploymentView, u as ViewChange, ui as preferDescription, un as AutoLayoutDirection, ur as LikeC4StyleDefaults, ut as LikeC4ProjectStyleDefaults, v as LayoutedLikeC4ModelData, vi as EdgeId, vn as ViewRuleGlobalPredicateRef, vr as Size, vt as isTagColorSpecified, w as ParsedView, wi as IconUrl, wn as isAutoLayoutDirection, wr as isThemeColor, wt as DeploymentRelationship, x as AnyView, xi as GlobalFqn, xn as ViewType, xr as ThemeColor, xt as DeploymentElementRef, y as LikeC4ModelData, yi as ElementKind, yn as ViewRuleGlobalStyle, yr as SpacingSize, yt as DeployedInstance, z as DeploymentViewExcludePredicate, zi as isGlobalFqn, zn as NotOperator, zt as DynamicStep } from "./_chunks/index.mjs";
1
+ import { $ as LayoutedViewDriftReason, $i as ExclusiveUnion, $n as whereOperatorAsPredicate, $t as ElementViewPredicate, A as isComputedView, Ai as RelationId, An as Expression, Ar as Sizes, At as ModelRelation, B as DeploymentViewIncludePredicate, Bi as isGlobalFqn, Bn as OperatorPredicate, Bt as DynamicStepsParallel, C as LayoutedView, Ci as GroupElementKind, Cn as isAutoLayoutDirection, Cr as ThemeColorValues, Ct as DeploymentRelation, D as ViewRule, Di as NodeId, Dn as ModelExpression, Dt as AbstractRelationship, E as ViewOnStage, Ei as MarkdownOrString, En as isViewRuleGlobalStyle, Er as BorderStyles, Et as isDeploymentNode, F as isExtendsElementView, Fi as StepEdgeKind, Fn as EqualOperator, Fr as AnyParsed, Ft as GlobalPredicates, G as DiagramEdge, Gi as stepEdgeId, Gn as WhereOperator, Gt as DynamicViewStep, H as DeploymentViewRule, Hi as isStepEdgeId, Hn as Participant, Ht as DynamicViewDisplayVariant, I as isScopedElementView, Ii as Tag, In as Filterable, Ir as Aux, It as GlobalStyleID, J as LayoutedDeploymentView, Ji as _layout, Jn as isMetadataEqual, Jt as isDynamicStep, K as DiagramNode, Ki as ExtractOnStage, Kn as isAndOperator, Kr as LooseLiteral, Kt as ParsedDynamicView, L as isViewRulePredicate, Li as ViewId, Ln as KindEqual, Lt as GlobalStyles, M as isDiagramView, Mi as RelationshipKind, Mn as PredicateSelector, Mr as Any, Mt as ensureSizes, N as isDynamicView, Ni as StepEdgeId, Nn as RelationExpr, Nr as AnyComputed, Nt as GlobalDynamicPredicates, O as ViewRulePredicate, Oi as NoneIcon, On as ModelFqnExpr, Or as ElementShapes, Ot as Element, P as isElementView, Pi as StepEdgeIdLiteral, Pn as AndOperator, Pr as AnyLayouted, Pt as GlobalPredicateId, Q as DiagramNodeDriftReason, Qi as Coalesce, Qn as isTagEqual, Qt as ElementViewIncludePredicate, R as isViewRuleStyle, Ri as extractStep, Rn as MetadataEqual, Rt as ModelGlobals, S as ComputedView, Si as GlobalFqn, Sn as ViewWithNotation, Sr as ThemeColor, St as DeploymentNode, T as ProcessedView, Ti as IconUrl, Tn as isViewRuleGlobalPredicateRef, Tr as isThemeColor, Tt as isDeployedInstance, U as DeploymentViewRuleStyle, Ui as scalar_d_exports, Un as ParticipantOperator, Ut as DynamicViewIncludeRule, V as DeploymentViewPredicate, Vi as isGroupElementKind, Vn as OrOperator, Vt as DynamicStepsSeries, W as ParsedDeploymentView, Wi as splitGlobalFqn, Wn as TagEqual, Wt as DynamicViewRule, X as LayoutedElementView, Xi as _type, Xn as isOrOperator, Xt as isDynamicStepsSeries, Y as LayoutedDynamicView, Yi as _stage, Yn as isNotOperator, Yt as isDynamicStepsParallel, Z as DiagramEdgeDriftReason, Zi as isOnStage, Zn as isParticipantOperator, Zt as ElementViewExcludePredicate, _ as ComputedLikeC4ModelData, _i as DeploymentFqn, _n as ViewRuleGlobalPredicateRef, _r as RelationshipLineType, _t as TagSpecification, a as isNonEmptyArray, aa as NonEmptyArray, ai as Unknown, an as isViewRuleGroup, ar as CustomColorDefinitions, at as ComputedNode, b as ParsedLikeC4ModelData, bi as ElementKind, bn as ViewType, br as SpacingSize, bt as DeploymentElement, c as RichTextEmpty, ca as ReorderedArray, ci as UnknownParsed, cn as AnyIncludePredicate, cr as HexColor, ct as LikeC4Project, d as AuxFromDump, di as preferDescription, dn as BaseParsedViewProperties, dr as LikeC4StyleDefaults, dt as LikeC4ProjectStylesConfig, ea as IterableContainer, ei as SpecAux, en as ElementViewRule, er as FqnRef, et as ViewManualLayoutSnapshot, f as LikeC4ModelDump, fi as preferSummary, fn as BaseViewProperties, fr as LikeC4StylesConfig, ft as LikeC4ProjectStylesCustomStylesheets, g as AuxFromLikeC4ModelData, gi as BuiltInIcon, gn as ViewRuleAutoLayout, gr as RelationshipColorValues, gt as Specification, h as SpecificationDump, hi as AnyFqn, hn as ViewAutoLayout, hr as RelationshipArrowTypes, ht as RelationshipSpecification, i as isAnyOf, ia as NTuple, in as ParsedElementView, ir as CustomColor, it as ComputedElementView, j as isDeploymentView, ji as RelationKind, jn as FqnExpr, jr as ThemeColors, jt as Relationship, k as ViewWithType, ki as ProjectId, kn as ModelRelationExpr, kr as IconPositions, kt as ElementStyle, l as RichTextOrEmpty, la as exact, ln as AnyViewRuleStyle, lr as IconPosition, lt as LikeC4ProjectManualLayoutsConfig, m as SpecTypesFromDump, mn as RankValue, mr as RelationshipArrowType, mt as ElementSpecification, n as GuardedBy, na as KeysOf, nn as ElementViewRuleRank, nr as Color, nt as ComputedDynamicView, o as isString, oa as NonEmptyReadonlyArray, oi as UnknownComputed, on as isViewRuleRank, or as ElementColorValues, ot as ComputedNodeStyle, p as ProjectDump, pn as NodeNotation, pr as LikeC4Theme, pt as LikeC4ProjectTheme, q as LayoutType, qi as ModelStage, qn as isKindEqual, qt as getParallelStepsPrefix, r as hasProp, ra as Link, rn as ElementViewRuleStyle, rr as ColorLiteral, rt as ComputedEdge, s as RichText, sa as Predicate, si as UnknownLayouted, sn as AnyExcludePredicate, sr as ElementShape, st as ComputedRankConstraint, t as Guard, ta as IteratorLike, tn as ElementViewRuleGroup, tr as BorderStyle, tt as ComputedDeploymentView, u as ViewChange, ui as _aux_d_exports, un as AutoLayoutDirection, ur as IconSize, ut as LikeC4ProjectStyleDefaults, v as LayoutedLikeC4ModelData, vi as DeploymentKind, vn as ViewRuleGlobalStyle, vr as ShapeSize, vt as isTagColorSpecified, w as ParsedView, wi as Icon, wn as isViewRuleAutoLayout, wr as isCustomColor, wt as DeploymentRelationship, x as AnyView, xi as Fqn, xn as ViewWithHash, xr as TextSize, xt as DeploymentElementRef, y as LikeC4ModelData, yi as EdgeId, yn as ViewRuleRank, yr as Size, yt as DeployedInstance, z as DeploymentViewExcludePredicate, zi as flattenMarkdownOrString, zn as NotOperator, zt as DynamicStep } 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
4
  import { a as DefaultWeakMap, i as LinkedList, n as MultiMap, o as DefaultMap, r as Queue } from "./_chunks/libs/mnemonist.mjs";
@@ -6,6 +6,15 @@ import "./_chunks/mnemonist.mjs";
6
6
  import { o as LayoutedProjectsView, r as ComputedProjectsView } from "./_chunks/_types2.mjs";
7
7
  import { D as isIterable, F as isAncestor, H as sortParentsFirst, I as isDescendantOf, J as nonNullable, L as isSameHierarchy, R as nameFromFqn, V as sortNaturalByFqn, Y as nonexhaustive, k as ancestorsFqn, m as memoizeProp, q as invariant, z as parentFqn } from "./_chunks/index5.mjs";
8
8
 
9
+ //#region src/manual-layout/applyCachedLayout.d.ts
10
+ /**
11
+ * When restoring a LayoutedView from cache, the cached view may have stale
12
+ * non-layout data (colors, links, tags, title, navigateTo, etc.)
13
+ * because view-hash only covers layout-affecting properties.
14
+ * This merges current ComputedView data onto the cached layout.
15
+ */
16
+ declare function applyCachedLayout(current: ComputedView, cached: LayoutedView): LayoutedView;
17
+ //#endregion
9
18
  //#region src/manual-layout/applyManualLayout.d.ts
10
19
  /**
11
20
  * Proof-of-concept
@@ -25,4 +34,4 @@ declare function applyManualLayout<V extends LayoutedView>(autoLayouted: V, snap
25
34
  */
26
35
  declare function calcDriftsFromSnapshot<V extends LayoutedView>(autoLayouted: V, snapshot: ViewManualLayoutSnapshot): V;
27
36
  //#endregion
28
- 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, 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, ViewManualLayout, ViewManualLayoutSnapshot, ViewOnStage, ViewRule, ViewRuleAutoLayout, ViewRuleGlobalPredicateRef, ViewRuleGlobalStyle, ViewRulePredicate, ViewRuleRank, ViewType, ViewWithHash, ViewWithNotation, ViewWithType, WhereOperator, XYPoint, _layout, _stage, _type, ancestorsFqn, 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, 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 };
37
+ 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 };
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import"./_chunks/libs/defu.mjs";import"./_chunks/libs/remeda.mjs";import{$ as e,A as t,B as n,C as r,D as i,E as a,G as o,H as s,J as c,K as l,O as u,Q as d,S as f,T as p,U as m,V as h,W as g,X as _,Y as v,Z as y,_ as b,_t as x,a as S,at as C,b as w,bt as T,c as E,ct as D,d as O,dt as k,et as A,f as j,ft as M,g as N,gt as P,h as F,ht as I,i as L,it as R,k as z,l as B,lt as V,m as H,mt as U,n as W,nt as G,o as K,ot as q,p as J,pt as Y,q as ee,r as X,rt as Z,s as Q,st as $,t as te,tt as ne,u as re,ut as ie,v as ae,vt as oe,w as se,x as ce,xt as le,y as ue,yt as de}from"./_chunks/types.mjs";import{i as fe,r as pe}from"./_chunks/geometry.mjs";import{$ as me,A as he,B as ge,G as _e,H as ve,I as ye,K as be,L as xe,O as Se,Q as Ce,R as we,U as Te,W as Ee,et as De,h as Oe,q as ke,z as Ae}from"./_chunks/utils.mjs";import"./_chunks/libs/graphology-dag.mjs";import{a as je,n as Me,o as Ne,r as Pe,t as Fe}from"./_chunks/libs/mnemonist.mjs";import"./_chunks/libs/natural-compare-lite.mjs";import"./_chunks/libs/ohash.mjs";import"./_chunks/libs/@ungap/structured-clone.mjs";import"./_chunks/libs/hast-util-sanitize.mjs";import"./_chunks/libs/rehype-sanitize.mjs";import"./_chunks/libs/hast-util-to-html.mjs";import"./_chunks/libs/character-entities-legacy.mjs";import"./_chunks/libs/character-entities-html4.mjs";import"./_chunks/libs/ccount.mjs";import"./_chunks/libs/comma-separated-tokens.mjs";import"./_chunks/libs/rehype-stringify.mjs";import"./_chunks/libs/devlop.mjs";import"./_chunks/libs/mdast-util-from-markdown.mjs";import"./_chunks/libs/escape-string-regexp.mjs";import"./_chunks/libs/mdast-util-find-and-replace.mjs";import"./_chunks/libs/mdast-util-gfm.mjs";import"./_chunks/libs/markdown-table.mjs";import"./_chunks/libs/longest-streak.mjs";import"./_chunks/libs/character-entities.mjs";import"./_chunks/libs/decode-named-character-reference.mjs";import"./_chunks/libs/micromark-extension-gfm.mjs";import"./_chunks/libs/remark-gfm.mjs";import"./_chunks/libs/remark-github-blockquote-alert.mjs";import"./_chunks/libs/remark-parse.mjs";import"./_chunks/libs/mdast-util-to-hast.mjs";import"./_chunks/libs/remark-rehype.mjs";import"./_chunks/libs/bail.mjs";import"./_chunks/libs/extend.mjs";import"./_chunks/libs/is-plain-obj.mjs";import"./_chunks/libs/trough.mjs";import"./_chunks/libs/unified.mjs";import"./_chunks/libs/@radix-ui/colors.mjs";import"./_chunks/libs/@mantine/colors-generator.mjs";import{n as Ie,t as Le}from"./_chunks/manual-layout.mjs";import"./_chunks/assignTagColors.mjs";import"./styles/index.mjs";var Re=Fe.default,ze=Me.default,Be=Pe.default,Ve=je.default,He=Ne.default;export{pe as BBox,Re as DefaultMap,ze as DefaultWeakMap,v as DeploymentFqn,_ as EdgeId,o as Expression,y as Fqn,l as FqnExpr,c as FqnRef,d as GlobalFqn,e as GroupElementKind,t as LikeC4Styles,Be as LinkedList,A as MarkdownOrString,s as ModelExpression,m as ModelFqnExpr,g as ModelRelationExpr,Ve as MultiMap,ne as NodeId,G as NoneIcon,Z as ProjectId,He as Queue,fe as RectBox,ee as RelationExpr,R as RelationId,te as RichText,C as StepEdgeKind,q as ViewId,I as _layout,P as _stage,x as _type,he as ancestorsFqn,Ie as applyManualLayout,Le as calcDriftsFromSnapshot,z as ensureSizes,le as exact,$ as extractStep,D as flattenMarkdownOrString,L as getParallelStepsPrefix,Ee as hasProp,Ce as invariant,ye as isAncestor,ce as isAndOperator,_e as isAnyOf,E as isAutoLayoutDirection,j as isComputedView,n as isDeployedInstance,h as isDeploymentNode,J as isDeploymentView,xe as isDescendantOf,H as isDiagramView,H as isLayoutedView,S as isDynamicStep,K as isDynamicStepsParallel,Q as isDynamicStepsSeries,F as isDynamicView,N as isElementView,b as isExtendsElementView,V as isGlobalFqn,ie as isGroupElementKind,Se as isIterable,f as isKindEqual,be as isNonEmptyArray,r as isNotOperator,oe as isOnStage,se as isOrOperator,p as isParticipantOperator,we as isSameHierarchy,ae as isScopedElementView,k as isStepEdgeId,ke as isString,u as isTagColorSpecified,a as isTagEqual,B as isViewRuleAutoLayout,re as isViewRuleGlobalPredicateRef,O as isViewRuleGlobalStyle,W as isViewRuleGroup,ue as isViewRulePredicate,X as isViewRuleRank,w as isViewRuleStyle,Oe as memoizeProp,Ae as nameFromFqn,me as nonNullable,De as nonexhaustive,ge as parentFqn,de as preferDescription,T as preferSummary,M as scalar,ve as sortNaturalByFqn,Te as sortParentsFirst,Y as splitGlobalFqn,U as stepEdgeId,i as whereOperatorAsPredicate};
1
+ import"./_chunks/libs/defu.mjs";import"./_chunks/libs/remeda.mjs";import{$ as e,A as t,C as n,D as r,E as i,G as a,H as o,J as s,K as c,O as l,Q as u,S as d,St as f,T as p,U as m,V as h,W as g,X as _,Y as v,Z as y,_ as b,_t as x,a as S,at as C,b as w,bt as T,c as E,ct as D,d as O,dt as k,et as A,f as j,ft as M,g as N,gt as P,h as F,ht as I,i as L,it as R,j as z,k as B,l as V,lt as H,m as U,mt as W,n as G,nt as K,o as q,ot as J,p as Y,pt as X,q as Z,r as Q,rt as $,s as ee,st as te,t as ne,tt as re,u as ie,ut as ae,v as oe,vt as se,w as ce,x as le,xt as ue,y as de,yt as fe}from"./_chunks/types.mjs";import{i as pe,r as me}from"./_chunks/geometry.mjs";import{$ as he,A as ge,B as _e,G as ve,H as ye,I as be,K as xe,L as Se,O as Ce,Q as we,R as Te,U as Ee,W as De,et as Oe,h as ke,q as Ae,z as je}from"./_chunks/utils.mjs";import"./_chunks/libs/graphology-dag.mjs";import{a as Me,n as Ne,o as Pe,r as Fe,t as Ie}from"./_chunks/libs/mnemonist.mjs";import"./_chunks/libs/natural-compare-lite.mjs";import"./_chunks/libs/ohash.mjs";import"./_chunks/libs/@ungap/structured-clone.mjs";import"./_chunks/libs/hast-util-sanitize.mjs";import"./_chunks/libs/rehype-sanitize.mjs";import"./_chunks/libs/hast-util-to-html.mjs";import"./_chunks/libs/character-entities-legacy.mjs";import"./_chunks/libs/character-entities-html4.mjs";import"./_chunks/libs/ccount.mjs";import"./_chunks/libs/comma-separated-tokens.mjs";import"./_chunks/libs/rehype-stringify.mjs";import"./_chunks/libs/devlop.mjs";import"./_chunks/libs/mdast-util-from-markdown.mjs";import"./_chunks/libs/escape-string-regexp.mjs";import"./_chunks/libs/mdast-util-find-and-replace.mjs";import"./_chunks/libs/mdast-util-gfm.mjs";import"./_chunks/libs/markdown-table.mjs";import"./_chunks/libs/longest-streak.mjs";import"./_chunks/libs/character-entities.mjs";import"./_chunks/libs/decode-named-character-reference.mjs";import"./_chunks/libs/micromark-extension-gfm.mjs";import"./_chunks/libs/remark-gfm.mjs";import"./_chunks/libs/remark-github-blockquote-alert.mjs";import"./_chunks/libs/remark-parse.mjs";import"./_chunks/libs/mdast-util-to-hast.mjs";import"./_chunks/libs/remark-rehype.mjs";import"./_chunks/libs/bail.mjs";import"./_chunks/libs/extend.mjs";import"./_chunks/libs/is-plain-obj.mjs";import"./_chunks/libs/trough.mjs";import"./_chunks/libs/unified.mjs";import"./_chunks/libs/@radix-ui/colors.mjs";import"./_chunks/libs/@mantine/colors-generator.mjs";import{i as Le,n as Re,t as ze}from"./_chunks/manual-layout.mjs";import"./_chunks/assignTagColors.mjs";import"./styles/index.mjs";var Be=Ie.default,Ve=Ne.default,He=Fe.default,Ue=Me.default,We=Pe.default;export{me as BBox,Be as DefaultMap,Ve as DefaultWeakMap,_ as DeploymentFqn,y as EdgeId,c as Expression,u as Fqn,Z as FqnExpr,v as FqnRef,e as GlobalFqn,A as GroupElementKind,z as LikeC4Styles,He as LinkedList,re as MarkdownOrString,m as ModelExpression,g as ModelFqnExpr,a as ModelRelationExpr,Ue as MultiMap,K as NodeId,$ as NoneIcon,R as ProjectId,We as Queue,pe as RectBox,s as RelationExpr,C as RelationId,ne as RichText,J as StepEdgeKind,te as ViewId,P as _layout,x as _stage,se as _type,ge as ancestorsFqn,Le as applyCachedLayout,Re as applyManualLayout,ze as calcDriftsFromSnapshot,t as ensureSizes,f as exact,D as extractStep,H as flattenMarkdownOrString,L as getParallelStepsPrefix,De as hasProp,we as invariant,be as isAncestor,le as isAndOperator,ve as isAnyOf,E as isAutoLayoutDirection,j as isComputedView,h as isDeployedInstance,o as isDeploymentNode,Y as isDeploymentView,Se as isDescendantOf,U as isDiagramView,U as isLayoutedView,S as isDynamicStep,q as isDynamicStepsParallel,ee as isDynamicStepsSeries,F as isDynamicView,N as isElementView,b as isExtendsElementView,ae as isGlobalFqn,k as isGroupElementKind,Ce as isIterable,d as isKindEqual,n as isMetadataEqual,xe as isNonEmptyArray,ce as isNotOperator,fe as isOnStage,p as isOrOperator,i as isParticipantOperator,Te as isSameHierarchy,oe as isScopedElementView,M as isStepEdgeId,Ae as isString,B as isTagColorSpecified,r as isTagEqual,V as isViewRuleAutoLayout,ie as isViewRuleGlobalPredicateRef,O as isViewRuleGlobalStyle,G as isViewRuleGroup,de as isViewRulePredicate,Q as isViewRuleRank,w as isViewRuleStyle,ke as memoizeProp,je as nameFromFqn,he as nonNullable,Oe as nonexhaustive,_e as parentFqn,T as preferDescription,ue as preferSummary,X as scalar,ye as sortNaturalByFqn,Ee as sortParentsFirst,W as splitGlobalFqn,I as stepEdgeId,l as whereOperatorAsPredicate};
@@ -1,4 +1,4 @@
1
- import { Ar as ThemeColors, Cr as isCustomColor, Dr as ElementShapes, Er as DefaultTagColors, Or as IconPositions, Sr as ThemeColorValues, Tr as BorderStyles, _r as ShapeSize, ar as ElementColorValues, br as TextSize, cr as IconPosition, dr as LikeC4StylesConfig, er as BorderStyle, fr as LikeC4Theme, gr as RelationshipLineType, hr as RelationshipColorValues, ir as CustomColorDefinitions, kr as Sizes, lr as IconSize, mr as RelationshipArrowTypes, nr as ColorLiteral, or as ElementShape, pr as RelationshipArrowType, rr as CustomColor, sr as HexColor, tr as Color, ur as LikeC4StyleDefaults, vr as Size, wr as isThemeColor, xr as ThemeColor, yr as SpacingSize } from "../_chunks/index.mjs";
1
+ import { Ar as Sizes, Cr as ThemeColorValues, Dr as DefaultTagColors, Er as BorderStyles, Or as ElementShapes, Sr as ThemeColor, Tr as isThemeColor, _r as RelationshipLineType, ar as CustomColorDefinitions, br as SpacingSize, cr as HexColor, dr as LikeC4StyleDefaults, fr as LikeC4StylesConfig, gr as RelationshipColorValues, hr as RelationshipArrowTypes, ir as CustomColor, jr as ThemeColors, kr as IconPositions, lr as IconPosition, mr as RelationshipArrowType, nr as Color, or as ElementColorValues, pr as LikeC4Theme, rr as ColorLiteral, sr as ElementShape, tr as BorderStyle, ur as IconSize, vr as ShapeSize, wr as isCustomColor, xr as TextSize, yr as Size } from "../_chunks/index.mjs";
2
2
  import "../_chunks/index2.mjs";
3
3
  import { a as assignTagColors, i as LikeC4Styles, n as styleDefaults, r as computeColorValues, t as defaultTheme } from "../_chunks/index3.mjs";
4
4
  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 };
@@ -1 +1 @@
1
- import"../_chunks/libs/defu.mjs";import"../_chunks/libs/remeda.mjs";import{A as e,F as t,I as n,L as r,M as i,N as a,P as o,R as s,j as c,z as l}from"../_chunks/types.mjs";import"../_chunks/geometry.mjs";import"../_chunks/utils.mjs";import"../_chunks/libs/graphology-dag.mjs";import"../_chunks/libs/mnemonist.mjs";import"../_chunks/libs/natural-compare-lite.mjs";import"../_chunks/libs/ohash.mjs";import"../_chunks/libs/@ungap/structured-clone.mjs";import"../_chunks/libs/hast-util-sanitize.mjs";import"../_chunks/libs/rehype-sanitize.mjs";import"../_chunks/libs/hast-util-to-html.mjs";import"../_chunks/libs/character-entities-legacy.mjs";import"../_chunks/libs/character-entities-html4.mjs";import"../_chunks/libs/ccount.mjs";import"../_chunks/libs/comma-separated-tokens.mjs";import"../_chunks/libs/rehype-stringify.mjs";import"../_chunks/libs/devlop.mjs";import"../_chunks/libs/mdast-util-from-markdown.mjs";import"../_chunks/libs/escape-string-regexp.mjs";import"../_chunks/libs/mdast-util-find-and-replace.mjs";import"../_chunks/libs/mdast-util-gfm.mjs";import"../_chunks/libs/markdown-table.mjs";import"../_chunks/libs/longest-streak.mjs";import"../_chunks/libs/character-entities.mjs";import"../_chunks/libs/decode-named-character-reference.mjs";import"../_chunks/libs/micromark-extension-gfm.mjs";import"../_chunks/libs/remark-gfm.mjs";import"../_chunks/libs/remark-github-blockquote-alert.mjs";import"../_chunks/libs/remark-parse.mjs";import"../_chunks/libs/mdast-util-to-hast.mjs";import"../_chunks/libs/remark-rehype.mjs";import"../_chunks/libs/bail.mjs";import"../_chunks/libs/extend.mjs";import"../_chunks/libs/is-plain-obj.mjs";import"../_chunks/libs/trough.mjs";import"../_chunks/libs/unified.mjs";import"../_chunks/libs/@radix-ui/colors.mjs";import"../_chunks/libs/@mantine/colors-generator.mjs";import{t as u}from"../_chunks/assignTagColors.mjs";const d=[`none`,`normal`,`onormal`,`dot`,`odot`,`diamond`,`odiamond`,`crow`,`open`,`vee`];function f(e){return l.includes(e)}function p(e){return!f(e)}export{o as BorderStyles,t as DefaultTagColors,n as ElementShapes,r as IconPositions,e as LikeC4Styles,d as RelationshipArrowTypes,s as Sizes,l as ThemeColors,u as assignTagColors,a as computeColorValues,c as defaultTheme,p as isCustomColor,f as isThemeColor,i as styleDefaults};
1
+ import"../_chunks/libs/defu.mjs";import"../_chunks/libs/remeda.mjs";import{B as e,F as t,I as n,L as r,M as i,N as a,P as o,R as s,j as c,z as l}from"../_chunks/types.mjs";import"../_chunks/geometry.mjs";import"../_chunks/utils.mjs";import"../_chunks/libs/graphology-dag.mjs";import"../_chunks/libs/mnemonist.mjs";import"../_chunks/libs/natural-compare-lite.mjs";import"../_chunks/libs/ohash.mjs";import"../_chunks/libs/@ungap/structured-clone.mjs";import"../_chunks/libs/hast-util-sanitize.mjs";import"../_chunks/libs/rehype-sanitize.mjs";import"../_chunks/libs/hast-util-to-html.mjs";import"../_chunks/libs/character-entities-legacy.mjs";import"../_chunks/libs/character-entities-html4.mjs";import"../_chunks/libs/ccount.mjs";import"../_chunks/libs/comma-separated-tokens.mjs";import"../_chunks/libs/rehype-stringify.mjs";import"../_chunks/libs/devlop.mjs";import"../_chunks/libs/mdast-util-from-markdown.mjs";import"../_chunks/libs/escape-string-regexp.mjs";import"../_chunks/libs/mdast-util-find-and-replace.mjs";import"../_chunks/libs/mdast-util-gfm.mjs";import"../_chunks/libs/markdown-table.mjs";import"../_chunks/libs/longest-streak.mjs";import"../_chunks/libs/character-entities.mjs";import"../_chunks/libs/decode-named-character-reference.mjs";import"../_chunks/libs/micromark-extension-gfm.mjs";import"../_chunks/libs/remark-gfm.mjs";import"../_chunks/libs/remark-github-blockquote-alert.mjs";import"../_chunks/libs/remark-parse.mjs";import"../_chunks/libs/mdast-util-to-hast.mjs";import"../_chunks/libs/remark-rehype.mjs";import"../_chunks/libs/bail.mjs";import"../_chunks/libs/extend.mjs";import"../_chunks/libs/is-plain-obj.mjs";import"../_chunks/libs/trough.mjs";import"../_chunks/libs/unified.mjs";import"../_chunks/libs/@radix-ui/colors.mjs";import"../_chunks/libs/@mantine/colors-generator.mjs";import{t as u}from"../_chunks/assignTagColors.mjs";const d=[`none`,`normal`,`onormal`,`dot`,`odot`,`diamond`,`odiamond`,`crow`,`open`,`vee`];function f(t){return e.includes(t)}function p(e){return!f(e)}export{t as BorderStyles,n as DefaultTagColors,r as ElementShapes,s as IconPositions,c as LikeC4Styles,d as RelationshipArrowTypes,l as Sizes,e as ThemeColors,u as assignTagColors,o as computeColorValues,i as defaultTheme,p as isCustomColor,f as isThemeColor,a as styleDefaults};
@@ -1,3 +1,3 @@
1
- import { $ as LayoutedViewDriftReason, $i as IterableContainer, $n as FqnRef, $r as SpecAux, $t as ElementViewPredicate, A as isComputedView, Ai as RelationKind, An as ModelRelationExpr, Ar as ThemeColors, At as ModelRelation, B as DeploymentViewIncludePredicate, Bi as isGroupElementKind, Bn as OperatorPredicate, Bt as DynamicStepsParallel, C as LayoutedView, Ci as Icon, Cn as ViewWithNotation, Cr as isCustomColor, Ct as DeploymentRelation, D as ViewRule, Di as NoneIcon, Dn as isViewRuleGlobalStyle, Dr as ElementShapes, Dt as AbstractRelationship, E as ViewOnStage, Ei as NodeId, En as isViewRuleGlobalPredicateRef, Et as isDeploymentNode, F as isExtendsElementView, Fi as Tag, Fn as AndOperator, Fr as Aux, Ft as GlobalPredicates, G as DiagramEdge, Gi as ExtractOnStage, Gn as WhereOperator, Gr as LooseLiteral, Gt as DynamicViewStep, H as DeploymentViewRule, Hi as scalar_d_exports, Hn as Participant, Ht as DynamicViewDisplayVariant, I as isScopedElementView, Ii as ViewId, In as EqualOperator, It as GlobalStyleID, J as LayoutedDeploymentView, Ji as _stage, Jn as isNotOperator, Jt as isDynamicStep, K as DiagramNode, Ki as ModelStage, Kn as isAndOperator, Kt as ParsedDynamicView, L as isViewRulePredicate, Li as extractStep, Ln as Filterable, Lt as GlobalStyles, M as isDiagramView, Mi as StepEdgeId, Mn as FqnExpr, Mr as AnyComputed, Mt as ensureSizes, N as isDynamicView, Ni as StepEdgeIdLiteral, Nn as PredicateSelector, Nr as AnyLayouted, Nt as GlobalDynamicPredicates, O as ViewRulePredicate, Oi as ProjectId, On as ModelExpression, Or as IconPositions, Ot as Element, P as isElementView, Pi as StepEdgeKind, Pn as RelationExpr, Pr as AnyParsed, Pt as GlobalPredicateId, Q as DiagramNodeDriftReason, Qi as ExclusiveUnion, Qn as whereOperatorAsPredicate, Qt as ElementViewIncludePredicate, R as isViewRuleStyle, Ri as flattenMarkdownOrString, Rn as KindEqual, Rt as ModelGlobals, S as ComputedView, Si as GroupElementKind, Sn as ViewWithHash, Sr as ThemeColorValues, St as DeploymentNode, T as ProcessedView, Ti as MarkdownOrString, Tn as isViewRuleAutoLayout, Tr as BorderStyles, Tt as isDeployedInstance, U as DeploymentViewRuleStyle, Ui as splitGlobalFqn, Un as ParticipantOperator, Ut as DynamicViewIncludeRule, V as DeploymentViewPredicate, Vi as isStepEdgeId, Vn as OrOperator, Vt as DynamicStepsSeries, W as ParsedDeploymentView, Wi as stepEdgeId, Wn as TagEqual, Wt as DynamicViewRule, X as LayoutedElementView, Xi as isOnStage, Xn as isParticipantOperator, Xt as isDynamicStepsSeries, Y as LayoutedDynamicView, Yi as _type, Yn as isOrOperator, Yt as isDynamicStepsParallel, Z as DiagramEdgeDriftReason, Zi as Coalesce, Zn as isTagEqual, Zt as ElementViewExcludePredicate, _ as ComputedLikeC4ModelData, _i as DeploymentKind, _n as ViewRuleAutoLayout, _r as ShapeSize, _t as TagSpecification, a as isNonEmptyArray, aa as NonEmptyReadonlyArray, ai as UnknownComputed, an as isViewRuleGroup, ar as ElementColorValues, at as ComputedNode, b as ParsedLikeC4ModelData, bi as Fqn, bn as ViewRuleRank, br as TextSize, bt as DeploymentElement, c as RichTextEmpty, ca as exact, cn as AnyIncludePredicate, cr as IconPosition, ct as LikeC4Project, d as AuxFromDump, di as preferSummary, dn as BaseParsedViewProperties, dr as LikeC4StylesConfig, dt as LikeC4ProjectStylesConfig, ea as IteratorLike, en as ElementViewRule, er as BorderStyle, et as ViewManualLayoutSnapshot, f as LikeC4ModelDump, fn as BaseViewProperties, fr as LikeC4Theme, ft as LikeC4ProjectStylesCustomStylesheets, g as AuxFromLikeC4ModelData, gi as DeploymentFqn, gn as ViewManualLayout, gr as RelationshipLineType, gt as Specification, h as SpecificationDump, hi as BuiltInIcon, hn as ViewAutoLayout, hr as RelationshipColorValues, ht as RelationshipSpecification, i as isAnyOf, ia as NonEmptyArray, ii as Unknown, in as ParsedElementView, ir as CustomColorDefinitions, it as ComputedElementView, j as isDeploymentView, ji as RelationshipKind, jn as Expression, jr as Any, jt as Relationship, k as ViewWithType, ki as RelationId, kn as ModelFqnExpr, kr as Sizes, kt as ElementStyle, l as RichTextOrEmpty, li as _aux_d_exports, ln as AnyViewRuleStyle, lr as IconSize, lt as LikeC4ProjectManualLayoutsConfig, m as SpecTypesFromDump, mi as AnyFqn, mn as RankValue, mr as RelationshipArrowTypes, mt as ElementSpecification, n as GuardedBy, na as Link, nn as ElementViewRuleRank, nr as ColorLiteral, nt as ComputedDynamicView, o as isString, oa as Predicate, oi as UnknownLayouted, on as isViewRuleRank, or as ElementShape, ot as ComputedNodeStyle, p as ProjectDump, pn as NodeNotation, pr as RelationshipArrowType, pt as LikeC4ProjectTheme, q as LayoutType, qi as _layout, qn as isKindEqual, qt as getParallelStepsPrefix, r as hasProp, ra as NTuple, rn as ElementViewRuleStyle, rr as CustomColor, rt as ComputedEdge, s as RichText, sa as ReorderedArray, si as UnknownParsed, sn as AnyExcludePredicate, sr as HexColor, st as ComputedRankConstraint, t as Guard, ta as KeysOf, tn as ElementViewRuleGroup, tr as Color, tt as ComputedDeploymentView, u as ViewChange, ui as preferDescription, un as AutoLayoutDirection, ur as LikeC4StyleDefaults, ut as LikeC4ProjectStyleDefaults, v as LayoutedLikeC4ModelData, vi as EdgeId, vn as ViewRuleGlobalPredicateRef, vr as Size, vt as isTagColorSpecified, w as ParsedView, wi as IconUrl, wn as isAutoLayoutDirection, wr as isThemeColor, wt as DeploymentRelationship, x as AnyView, xi as GlobalFqn, xn as ViewType, xr as ThemeColor, xt as DeploymentElementRef, y as LikeC4ModelData, yi as ElementKind, yn as ViewRuleGlobalStyle, yr as SpacingSize, yt as DeployedInstance, z as DeploymentViewExcludePredicate, zi as isGlobalFqn, zn as NotOperator, zt as DynamicStep } from "../_chunks/index.mjs";
1
+ import { $ as LayoutedViewDriftReason, $i as ExclusiveUnion, $n as whereOperatorAsPredicate, $t as ElementViewPredicate, A as isComputedView, Ai as RelationId, An as Expression, Ar as Sizes, At as ModelRelation, B as DeploymentViewIncludePredicate, Bi as isGlobalFqn, Bn as OperatorPredicate, Bt as DynamicStepsParallel, C as LayoutedView, Ci as GroupElementKind, Cn as isAutoLayoutDirection, Cr as ThemeColorValues, Ct as DeploymentRelation, D as ViewRule, Di as NodeId, Dn as ModelExpression, Dt as AbstractRelationship, E as ViewOnStage, Ei as MarkdownOrString, En as isViewRuleGlobalStyle, Er as BorderStyles, Et as isDeploymentNode, F as isExtendsElementView, Fi as StepEdgeKind, Fn as EqualOperator, Fr as AnyParsed, Ft as GlobalPredicates, G as DiagramEdge, Gi as stepEdgeId, Gn as WhereOperator, Gt as DynamicViewStep, H as DeploymentViewRule, Hi as isStepEdgeId, Hn as Participant, Ht as DynamicViewDisplayVariant, I as isScopedElementView, Ii as Tag, In as Filterable, Ir as Aux, It as GlobalStyleID, J as LayoutedDeploymentView, Ji as _layout, Jn as isMetadataEqual, Jt as isDynamicStep, K as DiagramNode, Ki as ExtractOnStage, Kn as isAndOperator, Kr as LooseLiteral, Kt as ParsedDynamicView, L as isViewRulePredicate, Li as ViewId, Ln as KindEqual, Lt as GlobalStyles, M as isDiagramView, Mi as RelationshipKind, Mn as PredicateSelector, Mr as Any, Mt as ensureSizes, N as isDynamicView, Ni as StepEdgeId, Nn as RelationExpr, Nr as AnyComputed, Nt as GlobalDynamicPredicates, O as ViewRulePredicate, Oi as NoneIcon, On as ModelFqnExpr, Or as ElementShapes, Ot as Element, P as isElementView, Pi as StepEdgeIdLiteral, Pn as AndOperator, Pr as AnyLayouted, Pt as GlobalPredicateId, Q as DiagramNodeDriftReason, Qi as Coalesce, Qn as isTagEqual, Qt as ElementViewIncludePredicate, R as isViewRuleStyle, Ri as extractStep, Rn as MetadataEqual, Rt as ModelGlobals, S as ComputedView, Si as GlobalFqn, Sn as ViewWithNotation, Sr as ThemeColor, St as DeploymentNode, T as ProcessedView, Ti as IconUrl, Tn as isViewRuleGlobalPredicateRef, Tr as isThemeColor, Tt as isDeployedInstance, U as DeploymentViewRuleStyle, Ui as scalar_d_exports, Un as ParticipantOperator, Ut as DynamicViewIncludeRule, V as DeploymentViewPredicate, Vi as isGroupElementKind, Vn as OrOperator, Vt as DynamicStepsSeries, W as ParsedDeploymentView, Wi as splitGlobalFqn, Wn as TagEqual, Wt as DynamicViewRule, X as LayoutedElementView, Xi as _type, Xn as isOrOperator, Xt as isDynamicStepsSeries, Y as LayoutedDynamicView, Yi as _stage, Yn as isNotOperator, Yt as isDynamicStepsParallel, Z as DiagramEdgeDriftReason, Zi as isOnStage, Zn as isParticipantOperator, Zt as ElementViewExcludePredicate, _ as ComputedLikeC4ModelData, _i as DeploymentFqn, _n as ViewRuleGlobalPredicateRef, _r as RelationshipLineType, _t as TagSpecification, a as isNonEmptyArray, aa as NonEmptyArray, ai as Unknown, an as isViewRuleGroup, ar as CustomColorDefinitions, at as ComputedNode, b as ParsedLikeC4ModelData, bi as ElementKind, bn as ViewType, br as SpacingSize, bt as DeploymentElement, c as RichTextEmpty, ca as ReorderedArray, ci as UnknownParsed, cn as AnyIncludePredicate, cr as HexColor, ct as LikeC4Project, d as AuxFromDump, di as preferDescription, dn as BaseParsedViewProperties, dr as LikeC4StyleDefaults, dt as LikeC4ProjectStylesConfig, ea as IterableContainer, ei as SpecAux, en as ElementViewRule, er as FqnRef, et as ViewManualLayoutSnapshot, f as LikeC4ModelDump, fi as preferSummary, fn as BaseViewProperties, fr as LikeC4StylesConfig, ft as LikeC4ProjectStylesCustomStylesheets, g as AuxFromLikeC4ModelData, gi as BuiltInIcon, gn as ViewRuleAutoLayout, gr as RelationshipColorValues, gt as Specification, h as SpecificationDump, hi as AnyFqn, hn as ViewAutoLayout, hr as RelationshipArrowTypes, ht as RelationshipSpecification, i as isAnyOf, ia as NTuple, in as ParsedElementView, ir as CustomColor, it as ComputedElementView, j as isDeploymentView, ji as RelationKind, jn as FqnExpr, jr as ThemeColors, jt as Relationship, k as ViewWithType, ki as ProjectId, kn as ModelRelationExpr, kr as IconPositions, kt as ElementStyle, l as RichTextOrEmpty, la as exact, ln as AnyViewRuleStyle, lr as IconPosition, lt as LikeC4ProjectManualLayoutsConfig, m as SpecTypesFromDump, mn as RankValue, mr as RelationshipArrowType, mt as ElementSpecification, n as GuardedBy, na as KeysOf, nn as ElementViewRuleRank, nr as Color, nt as ComputedDynamicView, o as isString, oa as NonEmptyReadonlyArray, oi as UnknownComputed, on as isViewRuleRank, or as ElementColorValues, ot as ComputedNodeStyle, p as ProjectDump, pn as NodeNotation, pr as LikeC4Theme, pt as LikeC4ProjectTheme, q as LayoutType, qi as ModelStage, qn as isKindEqual, qt as getParallelStepsPrefix, r as hasProp, ra as Link, rn as ElementViewRuleStyle, rr as ColorLiteral, rt as ComputedEdge, s as RichText, sa as Predicate, si as UnknownLayouted, sn as AnyExcludePredicate, sr as ElementShape, st as ComputedRankConstraint, t as Guard, ta as IteratorLike, tn as ElementViewRuleGroup, tr as BorderStyle, tt as ComputedDeploymentView, u as ViewChange, ui as _aux_d_exports, un as AutoLayoutDirection, ur as IconSize, ut as LikeC4ProjectStyleDefaults, v as LayoutedLikeC4ModelData, vi as DeploymentKind, vn as ViewRuleGlobalStyle, vr as ShapeSize, vt as isTagColorSpecified, w as ParsedView, wi as Icon, wn as isViewRuleAutoLayout, wr as isCustomColor, wt as DeploymentRelationship, x as AnyView, xi as Fqn, xn as ViewWithHash, xr as TextSize, xt as DeploymentElementRef, y as LikeC4ModelData, yi as EdgeId, yn as ViewRuleRank, yr as Size, yt as DeployedInstance, z as DeploymentViewExcludePredicate, zi as flattenMarkdownOrString, zn as NotOperator, zt as DynamicStep } 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, 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, ViewManualLayout, 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, 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, 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 };
@@ -1 +1 @@
1
- import"../_chunks/libs/defu.mjs";import"../_chunks/libs/remeda.mjs";import{$ as e,B as t,C as n,D as r,E as i,G as a,H as o,J as s,K as c,O as l,Q as u,S as d,T as f,U as p,V as m,W as h,X as g,Y as _,Z as v,_ as y,_t as b,a as x,at as S,b as C,bt as w,c as T,ct as E,d as D,dt as O,et as k,f as A,ft as j,g as M,gt as N,h as P,ht as F,i as I,it as L,k as ee,l as R,lt as z,m as B,mt as V,n as H,nt as U,o as W,ot as G,p as K,pt as q,q as J,r as Y,rt as X,s as Z,st as Q,t as $,tt as te,u as ne,ut as re,v as ie,vt as ae,w as oe,x as se,xt as ce,y as le,yt as ue}from"../_chunks/types.mjs";import{i as de,r as fe}from"../_chunks/geometry.mjs";import{G as pe,K as me,W as he,q as ge}from"../_chunks/utils.mjs";import"../_chunks/libs/graphology-dag.mjs";import"../_chunks/libs/mnemonist.mjs";import"../_chunks/libs/natural-compare-lite.mjs";import"../_chunks/libs/ohash.mjs";import"../_chunks/libs/@ungap/structured-clone.mjs";import"../_chunks/libs/hast-util-sanitize.mjs";import"../_chunks/libs/rehype-sanitize.mjs";import"../_chunks/libs/hast-util-to-html.mjs";import"../_chunks/libs/character-entities-legacy.mjs";import"../_chunks/libs/character-entities-html4.mjs";import"../_chunks/libs/ccount.mjs";import"../_chunks/libs/comma-separated-tokens.mjs";import"../_chunks/libs/rehype-stringify.mjs";import"../_chunks/libs/devlop.mjs";import"../_chunks/libs/mdast-util-from-markdown.mjs";import"../_chunks/libs/escape-string-regexp.mjs";import"../_chunks/libs/mdast-util-find-and-replace.mjs";import"../_chunks/libs/mdast-util-gfm.mjs";import"../_chunks/libs/markdown-table.mjs";import"../_chunks/libs/longest-streak.mjs";import"../_chunks/libs/character-entities.mjs";import"../_chunks/libs/decode-named-character-reference.mjs";import"../_chunks/libs/micromark-extension-gfm.mjs";import"../_chunks/libs/remark-gfm.mjs";import"../_chunks/libs/remark-github-blockquote-alert.mjs";import"../_chunks/libs/remark-parse.mjs";import"../_chunks/libs/mdast-util-to-hast.mjs";import"../_chunks/libs/remark-rehype.mjs";import"../_chunks/libs/bail.mjs";import"../_chunks/libs/extend.mjs";import"../_chunks/libs/is-plain-obj.mjs";import"../_chunks/libs/trough.mjs";import"../_chunks/libs/unified.mjs";import"../_chunks/libs/@radix-ui/colors.mjs";import"../_chunks/libs/@mantine/colors-generator.mjs";export{fe as BBox,_ as DeploymentFqn,g as EdgeId,a as Expression,v as Fqn,c as FqnExpr,s as FqnRef,u as GlobalFqn,e as GroupElementKind,k as MarkdownOrString,o as ModelExpression,p as ModelFqnExpr,h as ModelRelationExpr,te as NodeId,U as NoneIcon,X as ProjectId,de as RectBox,J as RelationExpr,L as RelationId,$ as RichText,S as StepEdgeKind,G as ViewId,F as _layout,N as _stage,b as _type,ee as ensureSizes,ce as exact,Q as extractStep,E as flattenMarkdownOrString,I as getParallelStepsPrefix,he as hasProp,se as isAndOperator,pe as isAnyOf,T as isAutoLayoutDirection,A as isComputedView,t as isDeployedInstance,m as isDeploymentNode,K as isDeploymentView,B as isDiagramView,B as isLayoutedView,x as isDynamicStep,W as isDynamicStepsParallel,Z as isDynamicStepsSeries,P as isDynamicView,M as isElementView,y as isExtendsElementView,z as isGlobalFqn,re as isGroupElementKind,d as isKindEqual,me as isNonEmptyArray,n as isNotOperator,ae as isOnStage,oe as isOrOperator,f as isParticipantOperator,ie as isScopedElementView,O as isStepEdgeId,ge as isString,l as isTagColorSpecified,i as isTagEqual,R as isViewRuleAutoLayout,ne as isViewRuleGlobalPredicateRef,D as isViewRuleGlobalStyle,H as isViewRuleGroup,le as isViewRulePredicate,Y as isViewRuleRank,C as isViewRuleStyle,ue as preferDescription,w as preferSummary,j as scalar,q as splitGlobalFqn,V as stepEdgeId,r as whereOperatorAsPredicate};
1
+ import"../_chunks/libs/defu.mjs";import"../_chunks/libs/remeda.mjs";import{$ as e,A as t,C as n,D as r,E as i,G as a,H as o,J as s,K as c,O as l,Q as u,S as d,St as f,T as p,U as m,V as h,W as g,X as _,Y as v,Z as y,_ as b,_t as x,a as S,at as C,b as w,bt as T,c as E,ct as D,d as O,dt as k,et as A,f as j,ft as M,g as N,gt as P,h as F,ht as I,i as L,it as ee,k as R,l as z,lt as B,m as V,mt as H,n as U,nt as W,o as G,ot as K,p as q,pt as J,q as Y,r as X,rt as Z,s as Q,st as $,t as te,tt as ne,u as re,ut as ie,v as ae,vt as oe,w as se,x as ce,xt as le,y as ue,yt as de}from"../_chunks/types.mjs";import{i as fe,r as pe}from"../_chunks/geometry.mjs";import{G as me,K as he,W as ge,q as _e}from"../_chunks/utils.mjs";import"../_chunks/libs/graphology-dag.mjs";import"../_chunks/libs/mnemonist.mjs";import"../_chunks/libs/natural-compare-lite.mjs";import"../_chunks/libs/ohash.mjs";import"../_chunks/libs/@ungap/structured-clone.mjs";import"../_chunks/libs/hast-util-sanitize.mjs";import"../_chunks/libs/rehype-sanitize.mjs";import"../_chunks/libs/hast-util-to-html.mjs";import"../_chunks/libs/character-entities-legacy.mjs";import"../_chunks/libs/character-entities-html4.mjs";import"../_chunks/libs/ccount.mjs";import"../_chunks/libs/comma-separated-tokens.mjs";import"../_chunks/libs/rehype-stringify.mjs";import"../_chunks/libs/devlop.mjs";import"../_chunks/libs/mdast-util-from-markdown.mjs";import"../_chunks/libs/escape-string-regexp.mjs";import"../_chunks/libs/mdast-util-find-and-replace.mjs";import"../_chunks/libs/mdast-util-gfm.mjs";import"../_chunks/libs/markdown-table.mjs";import"../_chunks/libs/longest-streak.mjs";import"../_chunks/libs/character-entities.mjs";import"../_chunks/libs/decode-named-character-reference.mjs";import"../_chunks/libs/micromark-extension-gfm.mjs";import"../_chunks/libs/remark-gfm.mjs";import"../_chunks/libs/remark-github-blockquote-alert.mjs";import"../_chunks/libs/remark-parse.mjs";import"../_chunks/libs/mdast-util-to-hast.mjs";import"../_chunks/libs/remark-rehype.mjs";import"../_chunks/libs/bail.mjs";import"../_chunks/libs/extend.mjs";import"../_chunks/libs/is-plain-obj.mjs";import"../_chunks/libs/trough.mjs";import"../_chunks/libs/unified.mjs";import"../_chunks/libs/@radix-ui/colors.mjs";import"../_chunks/libs/@mantine/colors-generator.mjs";export{pe as BBox,_ as DeploymentFqn,y as EdgeId,c as Expression,u as Fqn,Y as FqnExpr,v as FqnRef,e as GlobalFqn,A as GroupElementKind,ne as MarkdownOrString,m as ModelExpression,g as ModelFqnExpr,a as ModelRelationExpr,W as NodeId,Z as NoneIcon,ee as ProjectId,fe as RectBox,s as RelationExpr,C as RelationId,te as RichText,K as StepEdgeKind,$ as ViewId,P as _layout,x as _stage,oe as _type,t as ensureSizes,f as exact,D as extractStep,B as flattenMarkdownOrString,L as getParallelStepsPrefix,ge as hasProp,ce as isAndOperator,me as isAnyOf,E as isAutoLayoutDirection,j as isComputedView,h as isDeployedInstance,o as isDeploymentNode,q as isDeploymentView,V as isDiagramView,V as isLayoutedView,S as isDynamicStep,G as isDynamicStepsParallel,Q as isDynamicStepsSeries,F as isDynamicView,N as isElementView,b as isExtendsElementView,ie as isGlobalFqn,k as isGroupElementKind,d as isKindEqual,n as isMetadataEqual,he as isNonEmptyArray,se as isNotOperator,de as isOnStage,p as isOrOperator,i as isParticipantOperator,ae as isScopedElementView,M as isStepEdgeId,_e as isString,R as isTagColorSpecified,r as isTagEqual,z as isViewRuleAutoLayout,re as isViewRuleGlobalPredicateRef,O as isViewRuleGlobalStyle,U as isViewRuleGroup,ue as isViewRulePredicate,X as isViewRuleRank,w as isViewRuleStyle,T as preferDescription,le as preferSummary,J as scalar,H as splitGlobalFqn,I as stepEdgeId,l as whereOperatorAsPredicate};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@likec4/core",
3
- "version": "1.51.0",
3
+ "version": "1.53.0",
4
4
  "license": "MIT",
5
5
  "homepage": "https://likec4.dev",
6
6
  "author": "Denis Davydkov <denis@davydkov.com>",
@@ -108,31 +108,31 @@
108
108
  },
109
109
  "devDependencies": {
110
110
  "@dagrejs/dagre": "1.1.8",
111
- "@mantine/colors-generator": "8.3.15",
111
+ "@mantine/colors-generator": "8.3.17",
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.11",
118
+ "@types/node": "~22.19.15",
119
119
  "@types/unist": "3.0.3",
120
- "@typescript/native-preview": "7.0.0-dev.20260221.1",
120
+ "@typescript/native-preview": "7.0.0-dev.20260316.1",
121
121
  "chroma-js": "^3.2.0",
122
122
  "defu": "^6.1.4",
123
123
  "fdir": "6.4.0",
124
124
  "graphology": "^0.26.0",
125
125
  "graphology-dag": "^0.4.1",
126
126
  "graphology-types": "^0.24.8",
127
- "mdast-util-from-markdown": "^2.0.2",
127
+ "mdast-util-from-markdown": "^2.0.3",
128
128
  "mdast-util-to-hast": "^13.2.1",
129
129
  "mdast-util-to-string": "^4.0.0",
130
130
  "mnemonist": "0.40.3",
131
131
  "natural-compare-lite": "^1.4.0",
132
132
  "obliterator": "^2.0.5",
133
- "obuild": "^0.4.31",
133
+ "obuild": "0.4.31",
134
134
  "ohash": "^2.0.11",
135
- "oxlint": "1.43.0",
135
+ "oxlint": "1.55.0",
136
136
  "rehype-format": "5.0.1",
137
137
  "rehype-sanitize": "^6.0.0",
138
138
  "rehype-stringify": "10.0.1",
@@ -141,14 +141,14 @@
141
141
  "remark-parse": "11.0.0",
142
142
  "remark-rehype": "11.1.2",
143
143
  "remeda": "^2.33.6",
144
- "turbo": "2.8.12",
144
+ "turbo": "2.8.17",
145
145
  "typescript": "5.9.3",
146
146
  "unified": "11.0.5",
147
- "vitest": "4.0.18",
147
+ "vitest": "4.1.0",
148
148
  "@likec4/devops": "1.42.0",
149
- "@likec4/style-preset": "1.51.0",
150
- "@likec4/styles": "1.51.0",
151
- "@likec4/tsconfig": "1.51.0"
149
+ "@likec4/styles": "1.53.0",
150
+ "@likec4/style-preset": "1.53.0",
151
+ "@likec4/tsconfig": "1.53.0"
152
152
  },
153
153
  "scripts": {
154
154
  "typecheck": "tsc -b --verbose",