@likec4/core 1.55.0 → 1.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/THIRD-PARTY-LICENSES.md +30 -30
  2. package/dist/_chunks/Builder.view-element.mjs +2 -2
  3. package/dist/_chunks/LikeC4Model.d.mts +1 -0
  4. package/dist/_chunks/assignTagColors.mjs +1 -1
  5. package/dist/_chunks/index3.d.mts +2 -2
  6. package/dist/_chunks/index5.d.mts +4 -0
  7. package/dist/_chunks/libs/{@mantine/colors-generator.mjs → chroma-js.mjs} +2 -2
  8. package/dist/_chunks/libs/graphology-dag.d.mts +607 -0
  9. package/dist/_chunks/libs/hast-util-to-html.mjs +1 -1
  10. package/dist/_chunks/libs/mdast-util-find-and-replace.mjs +1 -1
  11. package/dist/_chunks/libs/mdast-util-from-markdown.mjs +1 -1
  12. package/dist/_chunks/libs/mdast-util-gfm.mjs +11 -11
  13. package/dist/_chunks/libs/mnemonist.mjs +1 -1
  14. package/dist/_chunks/libs/unified.mjs +1 -1
  15. package/dist/_chunks/manual-layout.mjs +1 -1
  16. package/dist/_chunks/mnemonist.d.mts +1 -1
  17. package/dist/_chunks/model.mjs +4 -4
  18. package/dist/_chunks/rolldown-runtime.mjs +1 -1
  19. package/dist/_chunks/types.mjs +1 -1
  20. package/dist/builder/index.d.mts +0 -6
  21. package/dist/builder/index.mjs +1 -1
  22. package/dist/compute-view/index.d.mts +0 -4
  23. package/dist/compute-view/index.mjs +2 -2
  24. package/dist/geometry/index.mjs +1 -1
  25. package/dist/index.d.mts +0 -1
  26. package/dist/index.mjs +1 -1
  27. package/dist/model/index.d.mts +0 -5
  28. package/dist/model/index.mjs +1 -1
  29. package/dist/styles/index.d.mts +0 -1
  30. package/dist/styles/index.mjs +1 -1
  31. package/dist/types/index.mjs +1 -1
  32. package/dist/utils/graphology/index.d.mts +2 -1
  33. package/dist/utils/graphology/index.mjs +1 -1
  34. package/dist/utils/index.d.mts +0 -2
  35. package/dist/utils/index.mjs +1 -1
  36. package/package.json +9 -9
  37. package/dist/_chunks/geometry.mjs +0 -1
  38. package/dist/_chunks/utils.mjs +0 -1
@@ -1 +1 @@
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};
1
+ import{$ as e,$t as t,A as n,C as r,D as i,Dn as a,E as o,En as s,G as c,H as l,J as u,K as d,O as f,On as p,Q as m,Qt as h,S as g,T as _,U as v,V as y,W as b,X as x,Xt as S,Y as C,Z as w,Zt as T,_ as E,_t as D,a as O,at as k,b as A,bn as j,c as M,ct as N,d as P,dt as F,et as I,f as L,ft as ee,g as R,gt as z,h as B,ht as V,i as H,it as U,k as W,l as G,lt as K,m as q,mt as J,n as Y,nt as X,o as Z,ot as Q,p as $,pt as te,q as ne,r as re,rt as ie,s as ae,st as oe,t as se,tt as ce,u as le,ut as ue,v as de,vt as fe,w as pe,x as me,y as he,yn as ge,yt as _e}from"../_chunks/types.mjs";export{ge as BBox,x as DeploymentFqn,w as EdgeId,d as Expression,m as Fqn,ne as FqnExpr,C as FqnRef,e as GlobalFqn,I as GroupElementKind,ce as MarkdownOrString,v as ModelExpression,b as ModelFqnExpr,c as ModelRelationExpr,X as NodeId,ie as NoneIcon,U as ProjectId,j as RectBox,u as RelationExpr,k as RelationId,se as RichText,Q as StepEdgeKind,oe as ViewId,z as _layout,D as _stage,fe as _type,n as ensureSizes,p as exact,N as extractStep,K as flattenMarkdownOrString,H as getParallelStepsPrefix,S as hasProp,me as isAndOperator,T as isAnyOf,M as isAutoLayoutDirection,L as isComputedView,y as isDeployedInstance,l as isDeploymentNode,$ as isDeploymentView,q as isDiagramView,q as isLayoutedView,O as isDynamicStep,Z as isDynamicStepsParallel,ae as isDynamicStepsSeries,B as isDynamicView,R as isElementView,E as isExtendsElementView,ue as isGlobalFqn,F as isGroupElementKind,g as isKindEqual,r as isMetadataEqual,h as isNonEmptyArray,pe as isNotOperator,_e as isOnStage,_ as isOrOperator,o as isParticipantOperator,de as isScopedElementView,ee as isStepEdgeId,t as isString,W as isTagColorSpecified,i as isTagEqual,G as isViewRuleAutoLayout,le as isViewRuleGlobalPredicateRef,P as isViewRuleGlobalStyle,Y as isViewRuleGroup,he as isViewRulePredicate,re as isViewRuleRank,A as isViewRuleStyle,s as preferDescription,a as preferSummary,te as scalar,J as splitGlobalFqn,V as stepEdgeId,f as whereOperatorAsPredicate};
@@ -1,2 +1,3 @@
1
+ import { n as topologicalSort, t as willCreateCycle } from "../../_chunks/libs/graphology-dag.mjs";
1
2
  import Graph from "graphology";
2
- export { Graph };
3
+ export { Graph, topologicalSort, willCreateCycle };
@@ -1 +1 @@
1
- import{t as e}from"../../_chunks/libs/graphology.mjs";export{e as Graph};
1
+ import{r as e}from"../../_chunks/rolldown-runtime.mjs";import{n as t,t as n}from"../../_chunks/libs/graphology-dag.mjs";import{t as r}from"../../_chunks/libs/graphology.mjs";var i=t(),a=e(n(),1),o=i.topologicalSort,s=a.default;export{r as Graph,a as n,i as t,o as topologicalSort,s as willCreateCycle};
@@ -1,6 +1,4 @@
1
1
  import { a as isNonEmptyArray, o as isString } from "../_chunks/index.mjs";
2
- import "../_chunks/index2.mjs";
3
2
  import { a as DefaultWeakMap, i as LinkedList, n as MultiMap, o as DefaultMap, r as Queue, t as Stack } from "../_chunks/libs/mnemonist.mjs";
4
- import "../_chunks/mnemonist.mjs";
5
3
  import { A as commonAncestor, B as sortByFqnHierarchically, C as iflat, D as isIterable, E as ifilter, F as isAncestor, G as sortNatural, H as sortParentsFirst, I as isDescendantOf, J as nonNullable, K as commonHead, L as isSameHierarchy, M as compareFqnHierarchically, N as hierarchyDistance, O as getOrCreate, P as hierarchyLevel, R as nameFromFqn, S as iflatMap, T as ifind, U as compareNatural, V as sortNaturalByFqn, W as compareNaturalHierarchically, Y as nonexhaustive, _ as toSet, a as difference, b as imap, c as symmetricDifference, d as delay, f as onNextTick, g as toArray, h as iunique, i as objectHash, j as compareByFqnHierarchically, k as ancestorsFqn, l as union, m as memoizeProp, n as markdownToHtml, o as equals, p as promiseNextTick, q as invariant, r as stringHash, s as intersection, t as markdownToText, u as compareRelations, v as isome, w as ifirst, x as ihead, y as ireduce, z as parentFqn } from "../_chunks/index5.mjs";
6
4
  export { DefaultMap, DefaultWeakMap, LinkedList, MultiMap, Queue, Stack, ancestorsFqn, commonAncestor, commonHead, compareByFqnHierarchically, compareFqnHierarchically, compareNatural, compareNaturalHierarchically, compareRelations, delay, difference, equals as equalsSet, getOrCreate, hierarchyDistance, hierarchyLevel, ifilter, ifind, ifirst, iflat, iflatMap, ihead, imap, intersection, invariant, ireduce, isAncestor, isDescendantOf, isIterable, isNonEmptyArray, isSameHierarchy, isString, isome, iunique, markdownToHtml, markdownToText, memoizeProp, nameFromFqn, nonNullable, nonexhaustive, objectHash, onNextTick, parentFqn, promiseNextTick, sortByFqnHierarchically, sortNatural, sortNaturalByFqn, sortParentsFirst, stringHash, symmetricDifference, toArray, toSet, union };
@@ -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,F as o,H as s,I as c,J as l,K as u,L as d,M as f,N as p,O as m,P as h,Q as g,R as _,S as v,T as y,U as b,V as x,X as S,Y as C,Z as w,_ as T,a as E,b as D,c as O,d as k,et as A,f as j,g as M,h as N,i as P,j as F,k as I,l as L,m as R,n as z,o as B,p as V,q as H,r as U,t as W,u as G,v as K,w as q,x as J,y as Y,z as X}from"../_chunks/utils.mjs";import"../_chunks/libs/graphology-dag.mjs";import{a as Z,c as Q,n as $,o as ee,r as te,t as ne}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";var re=ne.default,ie=$.default,ae=te.default,oe=Z.default,se=ee.default,ce=Q.default;export{re as DefaultMap,ie as DefaultWeakMap,ae as LinkedList,oe as MultiMap,se as Queue,ce as Stack,t as ancestorsFqn,F as commonAncestor,w as commonHead,f as compareByFqnHierarchically,p as compareFqnHierarchically,l as compareNatural,C as compareNaturalHierarchically,k as compareRelations,j as delay,E as difference,B as equalsSet,I as getOrCreate,h as hierarchyDistance,o as hierarchyLevel,i as ifilter,a as ifind,y as ifirst,q as iflat,r as iflatMap,v as ihead,J as imap,O as intersection,g as invariant,D as ireduce,c as isAncestor,d as isDescendantOf,m as isIterable,u as isNonEmptyArray,_ as isSameHierarchy,H as isString,Y as isome,M as iunique,z as markdownToHtml,W as markdownToText,N as memoizeProp,X as nameFromFqn,e as nonNullable,A as nonexhaustive,P as objectHash,V as onNextTick,n as parentFqn,R as promiseNextTick,x as sortByFqnHierarchically,S as sortNatural,s as sortNaturalByFqn,b as sortParentsFirst,U as stringHash,L as symmetricDifference,T as toArray,K as toSet,G as union};
1
+ import{$t as e,At as t,Bt as n,Cn as r,Ct as i,Dt as a,Et as o,Ft as s,Gt as c,Ht as l,It as u,Jt as d,Kt as f,Lt as p,Mt as m,Nt as h,Pt as g,Qt as _,Rt as v,Sn as y,St as b,Tt as x,Ut as S,Vt as C,Wt as w,Yt as T,_n as E,an as D,cn as O,dn as k,en as A,fn as j,gn as M,hn as N,in as P,jt as F,kt as I,ln as L,mn as R,nn as z,on as B,pn as V,qt as H,rn as U,sn as W,tn as G,un as K,vn as q,wt as J,xn as Y,zt as X}from"../_chunks/types.mjs";import{a as Z,c as Q,n as $,o as ee,r as te,t as ne}from"../_chunks/libs/mnemonist.mjs";var re=ne.default,ie=$.default,ae=te.default,oe=Z.default,se=ee.default,ce=Q.default;export{re as DefaultMap,ie as DefaultWeakMap,ae as LinkedList,oe as MultiMap,se as Queue,ce as Stack,G as ancestorsFqn,z as commonAncestor,q as commonHead,U as compareByFqnHierarchically,P as compareFqnHierarchically,N as compareNatural,M as compareNaturalHierarchically,m as compareRelations,h as delay,o as difference,a as equalsSet,A as getOrCreate,D as hierarchyDistance,B as hierarchyLevel,d as ifilter,H as ifind,f as ifirst,c as iflat,w as iflatMap,S as ihead,l as imap,I as intersection,Y as invariant,C as ireduce,W as isAncestor,O as isDescendantOf,T as isIterable,_ as isNonEmptyArray,L as isSameHierarchy,e as isString,n as isome,p as iunique,i as markdownToHtml,b as markdownToText,u as memoizeProp,K as nameFromFqn,y as nonNullable,r as nonexhaustive,x as objectHash,g as onNextTick,k as parentFqn,s as promiseNextTick,j as sortByFqnHierarchically,E as sortNatural,V as sortNaturalByFqn,R as sortParentsFirst,J as stringHash,t as symmetricDifference,v as toArray,X as toSet,F as union};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@likec4/core",
3
- "version": "1.55.0",
3
+ "version": "1.56.0",
4
4
  "license": "MIT",
5
5
  "homepage": "https://likec4.dev",
6
6
  "author": "Denis Davydkov <denis@davydkov.com>",
@@ -108,17 +108,17 @@
108
108
  },
109
109
  "devDependencies": {
110
110
  "@dagrejs/dagre": "1.1.8",
111
- "@mantine/colors-generator": "8.3.18",
111
+ "@mantine/colors-generator": "9.1.0",
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.15",
118
+ "@types/node": "~22.19.17",
119
119
  "@types/unist": "3.0.3",
120
- "@typescript/native-preview": "7.0.0-dev.20260409.1",
121
- "chroma-js": "^3.2.0",
120
+ "@typescript/native-preview": "7.0.0-dev.20260424.2",
121
+ "chroma-js": "3.2.0",
122
122
  "defu": "^6.1.7",
123
123
  "fdir": "6.4.0",
124
124
  "graphology": "^0.26.0",
@@ -141,14 +141,14 @@
141
141
  "remark-parse": "11.0.0",
142
142
  "remark-rehype": "11.1.2",
143
143
  "remeda": "^2.33.7",
144
- "turbo": "2.9.5",
144
+ "turbo": "2.9.6",
145
145
  "typescript": "5.9.3",
146
146
  "unified": "11.0.5",
147
147
  "vitest": "4.1.3",
148
148
  "@likec4/devops": "1.42.0",
149
- "@likec4/styles": "1.55.0",
150
- "@likec4/style-preset": "1.55.0",
151
- "@likec4/tsconfig": "1.55.0"
149
+ "@likec4/styles": "1.56.0",
150
+ "@likec4/style-preset": "1.56.0",
151
+ "@likec4/tsconfig": "1.56.0"
152
152
  },
153
153
  "scripts": {
154
154
  "typecheck": "tsc -b --verbose",
@@ -1 +0,0 @@
1
- import{Q as e}from"./libs/remeda.mjs";import{Q as t}from"./utils.mjs";function n(e){return Array.isArray(e)&&e.length===2&&typeof e[0]==`number`&&typeof e[1]==`number`}function r(e){return n(e)?{x:e[0],y:e[1]}:[e.x,e.y]}const i={center({x:e,y:t,width:n,height:r}){return{x:e+n/2,y:t+r/2}},toPoints({x:e,y:t,width:n,height:r}){return[{x:e,y:t},{x:e+n,y:t},{x:e+n,y:t+r},{x:e,y:t+r}]},fromPoints(e){let{x1:t,y1:n,x2:r,y2:i}=a.fromPoints(e);return{x:t,y:n,width:r-t,height:i-n}},merge(...n){if(t(e(n,1),`No boxes provided`),n.length===1)return n[0];let r=n[0].x,i=n[0].y,a=n[0].x+n[0].width,o=n[0].y+n[0].height;for(let e=1;e<n.length;e++){let t=n[e];r=Math.min(r,t.x),i=Math.min(i,t.y),a=Math.max(a,t.x+t.width),o=Math.max(o,t.y+t.height)}return{x:Math.floor(r),y:Math.floor(i),width:Math.round(a-r),height:Math.round(o-i)}},fromRectBox(e){return{x:Math.min(e.x1,e.x2),y:Math.min(e.y1,e.y2),width:Math.abs(e.x2-e.x1),height:Math.abs(e.y2-e.y1)}},toRectBox(e){return{x1:e.x,y1:e.y,x2:e.x+e.width,y2:e.y+e.height}},expand(e,t){return t===0?e:{x:e.x-t,y:e.y-t,width:e.width+t*2,height:e.height+t*2}},shrink(e,t){return t===0?e:{x:e.x+t,y:e.y+t,width:e.width-t*2,height:e.height-t*2}},includes(e,t){return e===t?!0:e.x<=t.x&&e.y<=t.y&&e.x+e.width>=t.x+t.width&&e.y+e.height>=t.y+t.height}},a={center({x1:e,y1:t,x2:n,y2:r}){return{x:(e+n)/2,y:(t+r)/2}},fromPoints(e){t(e.length>0,`At least one point is required`);let n=1/0,r=1/0,i=-1/0,a=-1/0;for(let[t,o]of e)n=Math.min(n,t),r=Math.min(r,o),i=Math.max(i,t),a=Math.max(a,o);return{x1:n,y1:r,x2:i,y2:a}},merge(...e){t(e.length>0,`No boxes provided`);let n=1/0,r=1/0,i=-1/0,a=-1/0;for(let t of e)n=Math.min(n,t.x1),r=Math.min(r,t.y1),i=Math.max(i,t.x2),a=Math.max(a,t.y2);return{x1:n,y1:r,x2:i,y2:a}},toBBox(e){return{x:e.x1,y:e.y1,width:e.x2-e.x1,height:e.y2-e.y1}},includes(e,t){return e===t?!0:e.x1<=t.x1&&e.y1<=t.y1&&e.x2>=t.x2&&e.y2>=t.y2}};var o=class e{constructor(e,n){this.x=e,this.y=n,t(typeof e==`number`&&!isNaN(e)&&isFinite(e)&&typeof n==`number`&&!isNaN(n)&&isFinite(n),`Invalid arguments for Vector: (${e}, ${n})`)}static create(...t){return t.length===2?new e(t[0],t[1]):new e(t[0].x,t[0].y)}static add(e,t){return{x:e.x+t.x,y:e.y+t.y}}static subtract(e,t){return{x:e.x-t.x,y:e.y-t.y}}static multiply(e,t){return{x:e.x*t,y:e.y*t}}static divide(e,t){return{x:e.x/t,y:e.y/t}}static dot(e,t){return e.x*t.x+e.y*t.y}add(t){return new e(this.x+t.x,this.y+t.y)}subtract(t){return new e(this.x-t.x,this.y-t.y)}multiply(t){return new e(this.x*t,this.y*t)}divide(t){return new e(this.x/t,this.y/t)}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}length(){return this.x===0&&this.y===0?0:Math.sqrt(this.x**2+this.y**2)}normalize(){let t=this.length();return t===0?new e(0,0):new e(this.x/t,this.y/t)}round(){return new e(Math.round(this.x),Math.round(this.y))}trunc(){return new e(Math.trunc(this.x),Math.trunc(this.y))}toObject(){return{x:this.x,y:this.y}}};function s(...e){return e.length===1&&e[0]instanceof o?e[0]:e.length===2?new o(e[0],e[1]):new o(e[0].x,e[0].y)}export{r as a,a as i,s as n,n as o,i as r,o as t};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime.mjs";import{t}from"./libs/defu.mjs";import{F as n,P as r,Q as i,R as a,T as o,a as s,et as ee,f as c,k as l,l as u,t as d}from"./libs/remeda.mjs";import{s as f}from"./libs/mnemonist.mjs";import{t as te}from"./libs/natural-compare-lite.mjs";import{t as p}from"./libs/ohash.mjs";import{n as m}from"./libs/hast-util-sanitize.mjs";import{t as h}from"./libs/rehype-sanitize.mjs";import{t as g}from"./libs/rehype-stringify.mjs";import{l as _,t as v}from"./libs/mdast-util-from-markdown.mjs";import{t as y}from"./libs/remark-gfm.mjs";import{t as b}from"./libs/remark-github-blockquote-alert.mjs";import{t as ne}from"./libs/remark-parse.mjs";import{t as re}from"./libs/remark-rehype.mjs";import{t as ie}from"./libs/unified.mjs";function ae(e,t){if(e===void 0||e==null){let n=typeof t==`function`?t():t;throw Error(n??`Expected defined value, but received ${e}`)}return e}function x(e,t){if(!e)throw Error(t??`Invariant failed`)}function S(e){throw Error(`NonExhaustive value: ${e}`)}function C(e,t,n){return e.length===0||t.length===0?[]:(n??=Object.is,ee(d(e,t),s(([e,t])=>n(e,t)),o(([e,t])=>e)))}var w=e(te(),1);function T(e,t){return e===t?0:l(e)?l(t)?(0,w.default)(e,t):1:l(t)?-1:0}function E(e){return u(e,T)}function D(...e){return e.length===0?E:E(e[0])}function O(e=`.`,t=!1){return(n,r)=>{if(n===r)return 0;if(!n)return-1;if(!r)return 1;let i=n.split(e),a=r.split(e),o=Math.min(i.length,a.length);for(let e=0;e<o;e++){let t=i[e],n=a[e],r=(0,w.default)(t,n);if(r!==0)return r}let s=i.length-a.length;return t?-1*s:s}}function k(e){return e!=null&&typeof e==`string`}function A(e){return!!e&&Array.isArray(e)&&e.length>0}function j(e,t){return x(typeof t==`string`,`Path must be string`),typeof e==`object`&&!!e&&e[t]!=null}function M(e){return t=>j(t,e)}function N(...e){if(e.length===1&&typeof e[0]==`string`)return M(e[0]);let[t,n]=e;return j(t,n)}function P(...e){return(t=>e.some(e=>e(t)))}function F(e){let t=e.lastIndexOf(`.`);return t>0?e.slice(0,t):null}function I(e){let t=e.lastIndexOf(`.`);return t>0?e.slice(t+1):e}const L=e=>k(e)?e:e.id;function R(e,t){let n=L(e);return t?L(t).startsWith(n+`.`):e=>{let t=L(e);return n.startsWith(t+`.`)}}function z(e,t){if(!t)return t=>z(e,t);let n=L(e),r=L(t);return n===r||r.startsWith(n+`.`)||n.startsWith(r+`.`)}function B(e,t){return t?R(t,e):t=>R(e,t)}function V(e){return(k(e)?e:e.id).split(`.`).length}function H(e,t){let n=k(e)?e:e.id,r=k(t)?t:t.id;if(n===r)return 0;let i=V(n),a=V(r);if(z(n,r))return Math.abs(i-a);let o=U(n,r),s=o?V(o):0;return i+a-(2*s+1)}function U(e,t){let n=e.split(`.`);if(n.length<2)return null;let r=t.split(`.`);if(r.length<2)return null;let i=[];for(let e=0;e<Math.min(n.length,r.length)-1&&n[e]===r[e];e++)i.push(n[e]);return i.length===0?null:i.join(`.`)}function W(e){let t=e.split(`.`);if(t.pop(),!i(t,2))return t;for(let e=1;e<t.length;e++)t[e]=t[e-1]+`.`+t[e];return t.reverse()}function G(e,t){let n=e.split(`.`).length,r=t.split(`.`).length;switch(!0){case n>r:return 1;case n<r:return-1;default:return 0}}function K(e,t){return G(e.id,t.id)}function q(e){return e.map(e=>({item:e,fqn:e.id.split(`.`)})).sort((e,t)=>e.fqn.length-t.fqn.length).map(({item:e})=>e)}function J(e,t){let n=t;for(let t of e)t!==n&&R(t,n)&&(n=t);return n===t?null:n}function oe(e){let t=[],n=[...e],r;for(;r=n.shift();){let e;for(;e=J(n,r);)t.push(...n.splice(n.indexOf(e),1));t.push(r)}return t}function Y(e,t){if(!e||k(e)){let t=e??`asc`;return e=>Y(e,t)}let n=t===`desc`?-1:1;return e.map(e=>({item:e,fqn:e.id.split(`.`)})).sort((e,t)=>{if(e.fqn.length!==t.fqn.length)return(e.fqn.length-t.fqn.length)*n;for(let n=0;n<e.fqn.length;n++){let r=T(e.fqn[n],t.fqn[n]);if(r!==0)return r}return 0}).map(({item:e})=>e)}function se(e,t,n){let r=e.get(t);return r||(r=n(t),e.set(t,r)),r}function ce(e){return typeof e==`object`&&!!e&&Symbol.iterator in e}function le(e,t){let r=t??e;x(n(r));function*i(e){for(let t of e)r(t)&&(yield t)}return t?i(e):i}function ue(e,t){let r=t??e;x(n(r));function i(e){for(let t of e)if(r(t))return t}return t?i(e):i}function de(e,t){let n=t??e;x(typeof n==`number`&&n>=0,`Count must be a non-negative number`);function*r(e){let t=0;for(let r of e){if(t>=n)break;yield r,t++}}return t===void 0?e=>r(e):r(e)}function fe(e){return e?X(e):X}function*X(e){for(let t of e)yield*t}function pe(e,t){let r=t??e;x(n(r));function*i(e){for(let t of e)yield*r(t)}return t?i(e):i}function me(e){return e?Z(e):Z}function Z(e){let{value:t}=e[Symbol.iterator]().next();return t}function he(e,t){let r=t??e;x(n(r));function*i(e){for(let t of e)yield r(t)}return t?i(e):i}function ge(e,t,r){let i=a(r)?t:e,o=r??t;x(n(i));function s(e){let t=o;for(let n of e)t=i(t,n);return t}return a(r)?s(e):s}function _e(e,t){let r=t??e;x(n(r));function i(e){for(let t of e)if(r(t))return!0;return!1}return t?i(e):i}function ve(e){return e?Array.from(e):e=>Array.from(e)}function ye(e){return e?new Set(e):e=>new Set(e)}function be(e){return e?Q(e):Q}function*Q(e){let t=new Set;for(let n of e)t.has(n)||(t.add(n),yield n)}function xe(e,t,n){let r=typeof t==`symbol`?t:Symbol.for(t);return e.hasOwnProperty(r)||Object.defineProperty(e,r,{enumerable:!1,writable:!1,value:n()}),e[r]}function Se(...e){let t=100;return e.length===2?t=c(e[0],e[1]):e.length===1&&(t=e[0]),new Promise(e=>{setTimeout(()=>{e(`LIKEC4_DELAY`)},t??100)})}function Ce(){return Promise.resolve().then(()=>void 0)}function we(e){Promise.resolve().then(e)}const Te=(e,t)=>{let n=U(e.source.id,e.target.id),r=U(t.source.id,t.target.id);if(n&&!r)return 1;if(!n&&r)return-1;let i=n&&r?G(n,r):0;if(i!==0)return i;let a=G(e.source.id,t.source.id);return a===0?G(e.target.id,t.target.id):a};function Ee(...e){let t=new Set;for(let n of e)for(let e of n)t.add(e);return t}function $(e,...t){let n=new Set;if(e.size===0)return n;let r=i(t,2)?(0,f.intersection)(...t):t[0];if(r.size===0)return n;for(let t of e)r.has(t)&&n.add(t);return n}function De(e,t){if(e.size===0)return new Set;if(t.size===0)return new Set(e);let n=new Set;for(let r of e)t.has(r)||n.add(r);return n}function Oe(e,t){return e.size===t.size&&[...e].every(e=>t.has(e))}function ke(e,t){return(0,f.symmetricDifference)(e,t)}function Ae(e,t){if(e.size===0||t.size===0)return!1;t.size<e.size&&([e,t]=[t,e]);for(let n of e)if(t.has(n))return!0;return!1}function je(e){return x(typeof e==`object`&&r(e),`objectHash: value must be an object`),p(e)}function Me(e){let t=5381,n=e.length;x(n>0,`stringHash: empty string`);for(let r=0;r<n;r++)t=t*33^e.charCodeAt(r);return(t>>>0).toString(36)}function Ne(){return ie().use(ne).use(y).use(b).use(re,{allowDangerousHtml:!0}).use(h,t({attributes:{"*":[`className`],svg:[`width`,`height`,`viewBox`,`fill`,`ariaHidden`],path:[`d`,`fill`,`stroke`,`strokeWidth`,`strokeLinecap`,`strokeLinejoin`]},tagNames:[`svg`,`g`,`path`,`div`],protocols:{src:[`data`]}},m)).use(g,{allowDangerousHtml:!0})}function Pe(e){return(``+Ne().processSync(e)).trim()}function Fe(e){return _(v(e),{includeHtml:!1,includeImageAlt:!1})}export{ae as $,W as A,F as B,pe as C,le as D,ue as E,V as F,P as G,Y as H,R as I,T as J,A as K,B as L,K as M,G as N,ce as O,H as P,x as Q,z as R,me as S,de as T,oe as U,q as V,N as W,D as X,O as Y,C as Z,ve as _,De as a,ge as b,$ as c,Te as d,S as et,Se as f,be as g,xe as h,je as i,U as j,se as k,ke as l,Ce as m,Pe as n,Oe as o,we as p,k as q,Me as r,Ae as s,Fe as t,Ee as u,ye as v,fe as w,he as x,_e as y,I as z};